| @@ 157-173 (lines=17) @@ | ||
| 154 | * @return void |
|
| 155 | * @throws \Exception Is thrown if the configured source directory is not available |
|
| 156 | */ |
|
| 157 | protected function initialize(string $serial) : void |
|
| 158 | { |
|
| 159 | ||
| 160 | // load the actual status |
|
| 161 | $status = $this->getRegistryProcessor()->getAttribute(RegistryKeys::STATUS); |
|
| 162 | ||
| 163 | // query whether or not the configured source directory is available |
|
| 164 | if ($this->getFilesystemAdapter()->isDir($sourceDir = $status[RegistryKeys::SOURCE_DIRECTORY])) { |
|
| 165 | // set the source directory, if it is accessible |
|
| 166 | $this->setSourceDir($sourceDir); |
|
| 167 | // return immediately |
|
| 168 | return; |
|
| 169 | } |
|
| 170 | ||
| 171 | // throw an exception otherwise |
|
| 172 | throw new \Exception(sprintf('Configured source directory "%s" is not available!', $sourceDir)); |
|
| 173 | } |
|
| 174 | ||
| 175 | /** |
|
| 176 | * Set's the filesystem loader used to resolve the file that has to be processed. |
|
| @@ 156-172 (lines=17) @@ | ||
| 153 | * @return void |
|
| 154 | * @throws \Exception Is thrown if the configured source directory is not available |
|
| 155 | */ |
|
| 156 | protected function initialize(string $serial) : void |
|
| 157 | { |
|
| 158 | ||
| 159 | // load the actual status |
|
| 160 | $status = $this->getRegistryProcessor()->getAttribute(RegistryKeys::STATUS); |
|
| 161 | ||
| 162 | // query whether or not the configured source directory is available |
|
| 163 | if ($this->getFilesystemAdapter()->isDir($sourceDir = $status[RegistryKeys::SOURCE_DIRECTORY])) { |
|
| 164 | // set the source directory, if it is accessible |
|
| 165 | $this->setSourceDir($sourceDir); |
|
| 166 | // return immediately |
|
| 167 | return; |
|
| 168 | } |
|
| 169 | ||
| 170 | // throw an exception otherwise |
|
| 171 | throw new \Exception(sprintf('Configured source directory "%s" is not available!', $sourceDir)); |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * Returns the suffix for the import files. |
|