| @@ 208-221 (lines=14) @@ | ||
| 205 | * |
|
| 206 | * @return string The name of the target directory |
|
| 207 | */ |
|
| 208 | protected function getTargetDir() |
|
| 209 | { |
|
| 210 | ||
| 211 | // load the actual status |
|
| 212 | $status = $this->getRegistryProcessor()->getAttribute($this->getSerial()); |
|
| 213 | ||
| 214 | // query whether or not the configured source directory is available |
|
| 215 | if (!is_dir($sourceDir = $status[RegistryKeys::SOURCE_DIRECTORY])) { |
|
| 216 | throw new \Exception(sprintf('Configured source directory %s is not available!', $sourceDir)); |
|
| 217 | } |
|
| 218 | ||
| 219 | // return the source directory where we want to export to |
|
| 220 | return $sourceDir; |
|
| 221 | } |
|
| 222 | } |
|
| 223 | ||
| @@ 187-200 (lines=14) @@ | ||
| 184 | * @return void |
|
| 185 | * @throws \Exception Is thrown if the configured source directory is not available |
|
| 186 | */ |
|
| 187 | protected function initialize($serial) |
|
| 188 | { |
|
| 189 | ||
| 190 | // load the actual status |
|
| 191 | $status = $this->getRegistryProcessor()->getAttribute($serial); |
|
| 192 | ||
| 193 | // query whether or not the configured source directory is available |
|
| 194 | if (!is_dir($sourceDir = $status[RegistryKeys::SOURCE_DIRECTORY])) { |
|
| 195 | throw new \Exception(sprintf('Configured source directory "%s" is not available!', $sourceDir)); |
|
| 196 | } |
|
| 197 | ||
| 198 | // set the source directory |
|
| 199 | $this->setSourceDir($sourceDir); |
|
| 200 | } |
|
| 201 | ||
| 202 | /** |
|
| 203 | * Sets the subject configuration instance. |
|