Complex classes like Configuration often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use Configuration, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 49 | class Configuration implements ConfigurationInterface, ListenerAwareConfigurationInterface |
||
|
|
|||
| 50 | { |
||
| 51 | |||
| 52 | /** |
||
| 53 | * The default PID filename to use. |
||
| 54 | * |
||
| 55 | * @var string |
||
| 56 | */ |
||
| 57 | const PID_FILENAME = 'importer.pid'; |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Trait that provides CSV configuration functionality. |
||
| 61 | * |
||
| 62 | * @var \TechDivision\Import\Configuration\Jms\Configuration\CsvTrait |
||
| 63 | */ |
||
| 64 | use CsvTrait; |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Trait that provides CSV configuration functionality. |
||
| 68 | * |
||
| 69 | * @var \TechDivision\Import\Configuration\Jms\Configuration\ParamsTrait |
||
| 70 | */ |
||
| 71 | use ParamsTrait; |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Trait that provides CSV configuration functionality. |
||
| 75 | * |
||
| 76 | * @var \TechDivision\Import\Configuration\Jms\Configuration\ListenersTrait |
||
| 77 | */ |
||
| 78 | use ListenersTrait; |
||
| 79 | |||
| 80 | /** |
||
| 81 | * The array with the available database types. |
||
| 82 | * |
||
| 83 | * @var array |
||
| 84 | * @Exclude |
||
| 85 | */ |
||
| 86 | protected $availableDatabaseTypes = array( |
||
| 87 | DatabaseConfigurationInterface::TYPE_MYSQL, |
||
| 88 | DatabaseConfigurationInterface::TYPE_REDIS |
||
| 89 | ); |
||
| 90 | |||
| 91 | /** |
||
| 92 | * The operation names to be executed. |
||
| 93 | * |
||
| 94 | * @var array |
||
| 95 | * @Exclude |
||
| 96 | */ |
||
| 97 | protected $operationNames = array(); |
||
| 98 | |||
| 99 | /** |
||
| 100 | * Mapping for boolean values passed on the console. |
||
| 101 | * |
||
| 102 | * @var array |
||
| 103 | * @Exclude |
||
| 104 | */ |
||
| 105 | protected $booleanMapping = array( |
||
| 106 | 'true' => true, |
||
| 107 | 'false' => false, |
||
| 108 | '1' => true, |
||
| 109 | '0' => false, |
||
| 110 | 'on' => true, |
||
| 111 | 'off' => false |
||
| 112 | ); |
||
| 113 | |||
| 114 | /** |
||
| 115 | * The serial that will be passed as commandline option (can not be specified in configuration file). |
||
| 116 | * |
||
| 117 | * @var string |
||
| 118 | * @Exclude |
||
| 119 | */ |
||
| 120 | protected $serial; |
||
| 121 | |||
| 122 | /** |
||
| 123 | * The shortcut that maps the operation names that has to be executed. |
||
| 124 | * |
||
| 125 | * @var string |
||
| 126 | * @Exclude |
||
| 127 | */ |
||
| 128 | protected $shortcut; |
||
| 129 | |||
| 130 | /** |
||
| 131 | * The flag to signal that the files should be move from the source to the target directory or not. |
||
| 132 | * |
||
| 133 | * @var boolean |
||
| 134 | * @Exclude |
||
| 135 | */ |
||
| 136 | protected $moveFiles = false; |
||
| 137 | |||
| 138 | /** |
||
| 139 | * The prefix for the move files subject. |
||
| 140 | * |
||
| 141 | * @var string |
||
| 142 | * @Exclude |
||
| 143 | */ |
||
| 144 | protected $moveFilesPrefix; |
||
| 145 | |||
| 146 | /** |
||
| 147 | * The application's unique DI identifier. |
||
| 148 | * |
||
| 149 | * @var string |
||
| 150 | * @Type("string") |
||
| 151 | * @SerializedName("id") |
||
| 152 | */ |
||
| 153 | protected $id; |
||
| 154 | |||
| 155 | /** |
||
| 156 | * The system name to use. |
||
| 157 | * |
||
| 158 | * @var string |
||
| 159 | * @Type("string") |
||
| 160 | * @SerializedName("system-name") |
||
| 161 | */ |
||
| 162 | protected $systemName; |
||
| 163 | |||
| 164 | /** |
||
| 165 | * The entity type code to use. |
||
| 166 | * |
||
| 167 | * @var string |
||
| 168 | * @Type("string") |
||
| 169 | * @SerializedName("entity-type-code") |
||
| 170 | */ |
||
| 171 | protected $entityTypeCode; |
||
| 172 | |||
| 173 | /** |
||
| 174 | * The Magento installation directory. |
||
| 175 | * |
||
| 176 | * @var string |
||
| 177 | * @Type("string") |
||
| 178 | * @SerializedName("installation-dir") |
||
| 179 | */ |
||
| 180 | protected $installationDir; |
||
| 181 | |||
| 182 | /** |
||
| 183 | * The source directory that has to be watched for new files. |
||
| 184 | * |
||
| 185 | * @var string |
||
| 186 | * @Type("string") |
||
| 187 | * @SerializedName("source-dir") |
||
| 188 | */ |
||
| 189 | protected $sourceDir; |
||
| 190 | |||
| 191 | /** |
||
| 192 | * The target directory with the files that has been imported. |
||
| 193 | * |
||
| 194 | * @var string |
||
| 195 | * @Type("string") |
||
| 196 | * @SerializedName("target-dir") |
||
| 197 | */ |
||
| 198 | protected $targetDir; |
||
| 199 | |||
| 200 | /** |
||
| 201 | * The Magento edition, EE or CE. |
||
| 202 | * |
||
| 203 | * @var string |
||
| 204 | * @Type("string") |
||
| 205 | * @SerializedName("magento-edition") |
||
| 206 | */ |
||
| 207 | protected $magentoEdition = 'CE'; |
||
| 208 | |||
| 209 | /** |
||
| 210 | * The Magento version, e. g. 2.2.0. |
||
| 211 | * |
||
| 212 | * @var string |
||
| 213 | * @Type("string") |
||
| 214 | * @SerializedName("magento-version") |
||
| 215 | */ |
||
| 216 | protected $magentoVersion = '2.2.0'; |
||
| 217 | |||
| 218 | /** |
||
| 219 | * ArrayCollection with the information of the configured databases. |
||
| 220 | * |
||
| 221 | * @var \Doctrine\Common\Collections\ArrayCollection |
||
| 222 | * @Type("ArrayCollection<TechDivision\Import\Configuration\Jms\Configuration\Database>") |
||
| 223 | */ |
||
| 224 | protected $databases; |
||
| 225 | |||
| 226 | /** |
||
| 227 | * ArrayCollection with the information of the configured loggers. |
||
| 228 | * |
||
| 229 | * @var \Doctrine\Common\Collections\ArrayCollection |
||
| 230 | * @Type("ArrayCollection<TechDivision\Import\Configuration\Jms\Configuration\Logger>") |
||
| 231 | */ |
||
| 232 | protected $loggers; |
||
| 233 | |||
| 234 | /** |
||
| 235 | * ArrayCollection with the information of the configured operations. |
||
| 236 | * |
||
| 237 | * @var \Doctrine\Common\Collections\ArrayCollection |
||
| 238 | * @Type("array<string, array<string, ArrayCollection<TechDivision\Import\Configuration\Jms\Configuration\Operation>>>") |
||
| 239 | */ |
||
| 240 | protected $operations; |
||
| 241 | |||
| 242 | /** |
||
| 243 | * The subject's multiple field delimiter character for fields with multiple values, defaults to (,). |
||
| 244 | * |
||
| 245 | * @var string |
||
| 246 | * @Type("string") |
||
| 247 | * @SerializedName("multiple-field-delimiter") |
||
| 248 | */ |
||
| 249 | protected $multipleFieldDelimiter = ','; |
||
| 250 | |||
| 251 | /** |
||
| 252 | * The subject's multiple value delimiter character for fields with multiple values, defaults to (|). |
||
| 253 | * |
||
| 254 | * @var string |
||
| 255 | * @Type("string") |
||
| 256 | * @SerializedName("multiple-value-delimiter") |
||
| 257 | */ |
||
| 258 | protected $multipleValueDelimiter = '|'; |
||
| 259 | |||
| 260 | /** |
||
| 261 | * The flag to signal that the subject has to use the strict mode or not. |
||
| 262 | * |
||
| 263 | * @var boolean |
||
| 264 | * @Type("boolean") |
||
| 265 | * @SerializedName("strict-mode") |
||
| 266 | */ |
||
| 267 | protected $strictMode; |
||
| 268 | |||
| 269 | /** |
||
| 270 | * The flag whether or not the import artefacts have to be archived. |
||
| 271 | * |
||
| 272 | * @var boolean |
||
| 273 | * @Type("boolean") |
||
| 274 | * @SerializedName("archive-artefacts") |
||
| 275 | */ |
||
| 276 | protected $archiveArtefacts; |
||
| 277 | |||
| 278 | /** |
||
| 279 | * The directory where the archives will be stored. |
||
| 280 | * |
||
| 281 | * @var string |
||
| 282 | * @Type("string") |
||
| 283 | * @SerializedName("archive-dir") |
||
| 284 | */ |
||
| 285 | protected $archiveDir; |
||
| 286 | |||
| 287 | /** |
||
| 288 | * The flag to signal that the subject has to use the debug mode or not. |
||
| 289 | * |
||
| 290 | * @var boolean |
||
| 291 | * @Type("boolean") |
||
| 292 | * @SerializedName("debug-mode") |
||
| 293 | */ |
||
| 294 | protected $debugMode = false; |
||
| 295 | |||
| 296 | /** |
||
| 297 | * The log level to use (see Monolog documentation). |
||
| 298 | * |
||
| 299 | * @var string |
||
| 300 | * @Type("string") |
||
| 301 | * @SerializedName("log-level") |
||
| 302 | */ |
||
| 303 | protected $logLevel = LogLevel::INFO; |
||
| 304 | |||
| 305 | /** |
||
| 306 | * The explicit DB ID to use. |
||
| 307 | * |
||
| 308 | * @var string |
||
| 309 | * @Type("string") |
||
| 310 | * @SerializedName("use-db-id") |
||
| 311 | */ |
||
| 312 | protected $useDbId; |
||
| 313 | |||
| 314 | /** |
||
| 315 | * The explicit PID filename to use. |
||
| 316 | * |
||
| 317 | * @var string |
||
| 318 | * @Type("string") |
||
| 319 | * @SerializedName("pid-filename") |
||
| 320 | */ |
||
| 321 | protected $pidFilename; |
||
| 322 | |||
| 323 | /** |
||
| 324 | * The collection with the paths to additional vendor directories. |
||
| 325 | * |
||
| 326 | * @var \Doctrine\Common\Collections\ArrayCollection |
||
| 327 | * @Type("ArrayCollection<TechDivision\Import\Configuration\Jms\Configuration\VendorDir>") |
||
| 328 | * @SerializedName("additional-vendor-dirs") |
||
| 329 | */ |
||
| 330 | protected $additionalVendorDirs; |
||
| 331 | |||
| 332 | /** |
||
| 333 | * The array with the Magento Edition specific extension libraries. |
||
| 334 | * |
||
| 335 | * @var array |
||
| 336 | * @Type("array") |
||
| 337 | * @SerializedName("extension-libraries") |
||
| 338 | */ |
||
| 339 | protected $extensionLibraries = array(); |
||
| 340 | |||
| 341 | /** |
||
| 342 | * The array with the custom header mappings. |
||
| 343 | * |
||
| 344 | * @var array |
||
| 345 | * @Type("array") |
||
| 346 | * @SerializedName("header-mappings") |
||
| 347 | */ |
||
| 348 | protected $headerMappings = array(); |
||
| 349 | |||
| 350 | /** |
||
| 351 | * The array with the custom image types. |
||
| 352 | * |
||
| 353 | * @var array |
||
| 354 | * @Type("array") |
||
| 355 | * @SerializedName("image-types") |
||
| 356 | */ |
||
| 357 | protected $imageTypes = array(); |
||
| 358 | |||
| 359 | /** |
||
| 360 | * The flag to signal that the import should be wrapped within a single transation or not. |
||
| 361 | * |
||
| 362 | * @var boolean |
||
| 363 | * @Type("boolean") |
||
| 364 | * @SerializedName("single-transaction") |
||
| 365 | */ |
||
| 366 | protected $singleTransaction = false; |
||
| 367 | |||
| 368 | /** |
||
| 369 | * The flag to signal that the cache should be enabled or not. |
||
| 370 | * |
||
| 371 | * @var boolean |
||
| 372 | * @Type("boolean") |
||
| 373 | * @SerializedName("cache-enabled") |
||
| 374 | */ |
||
| 375 | protected $cacheEnabled = true; |
||
| 376 | |||
| 377 | /** |
||
| 378 | * ArrayCollection with the information of the configured aliases. |
||
| 379 | * |
||
| 380 | * @var \Doctrine\Common\Collections\ArrayCollection |
||
| 381 | * @Type("ArrayCollection<TechDivision\Import\Configuration\Jms\Configuration\Alias>") |
||
| 382 | */ |
||
| 383 | protected $aliases; |
||
| 384 | |||
| 385 | /** |
||
| 386 | * ArrayCollection with the information of the configured caches. |
||
| 387 | * |
||
| 388 | * @var \Doctrine\Common\Collections\ArrayCollection |
||
| 389 | * @Type("ArrayCollection<TechDivision\Import\Configuration\Jms\Configuration\Cache>") |
||
| 390 | */ |
||
| 391 | protected $caches; |
||
| 392 | |||
| 393 | /** |
||
| 394 | * The flag to signal that the configuration files have to be loaded, merged and compiled. |
||
| 395 | * |
||
| 396 | * @var boolean |
||
| 397 | * @Type("boolean") |
||
| 398 | * @SerializedName("compile") |
||
| 399 | */ |
||
| 400 | protected $compile = true; |
||
| 401 | |||
| 402 | /** |
||
| 403 | * The array with the shortcuts. |
||
| 404 | * |
||
| 405 | * @var array |
||
| 406 | * @Type("array<string, array<string, array>>") |
||
| 407 | * @SerializedName("shortcuts") |
||
| 408 | */ |
||
| 409 | protected $shortcuts = array(); |
||
| 410 | |||
| 411 | /** |
||
| 412 | * Lifecycle callback that will be invoked after deserialization. |
||
| 413 | * |
||
| 414 | * @return void |
||
| 415 | * @PostDeserialize |
||
| 416 | */ |
||
| 417 | public function postDeserialize() |
||
| 445 | |||
| 446 | /** |
||
| 447 | * Map's the passed value to a boolean. |
||
| 448 | * |
||
| 449 | * @param string $value The value to map |
||
| 450 | * |
||
| 451 | * @return boolean The mapped value |
||
| 452 | * @throws \Exception Is thrown, if the value can't be mapped |
||
| 453 | */ |
||
| 454 | public function mapBoolean($value) |
||
| 465 | |||
| 466 | /** |
||
| 467 | * Return's the application's unique DI identifier. |
||
| 468 | * |
||
| 469 | * @return string The application's unique DI identifier |
||
| 470 | */ |
||
| 471 | public function getId() |
||
| 475 | |||
| 476 | /** |
||
| 477 | * Add's the operation with the passed name ot the operations that has to be executed. |
||
| 478 | * |
||
| 479 | * If the operation name has already been added, it'll not be added again. |
||
| 480 | * |
||
| 481 | * @param string $operationName The operation to be executed |
||
| 482 | * @param boolean $prepend TRUE if the operation name should be prepended, else FALSE |
||
| 483 | * |
||
| 484 | * @return void |
||
| 485 | */ |
||
| 486 | public function addOperationName($operationName, $prepend = false) |
||
| 497 | |||
| 498 | /** |
||
| 499 | * Return's the operation names that has to be executed. |
||
| 500 | * |
||
| 501 | * @param array $operationNames The operation names that has to be executed |
||
| 502 | * |
||
| 503 | * @return void |
||
| 504 | */ |
||
| 505 | public function setOperationNames(array $operationNames) |
||
| 509 | |||
| 510 | /** |
||
| 511 | * Return's the operation names that has to be executed. |
||
| 512 | * |
||
| 513 | * @return array The operation names that has to be executed |
||
| 514 | */ |
||
| 515 | public function getOperationNames() |
||
| 519 | |||
| 520 | /** |
||
| 521 | * Queries whether or not the passed operation has to be exceuted or not. |
||
| 522 | * |
||
| 523 | * @param \TechDivision\Import\Configuration\OperationConfigurationInterface $operation The operation to query for |
||
| 524 | * |
||
| 525 | * @return boolean TRUE if the operation has to be executed, else FALSE |
||
| 526 | */ |
||
| 527 | public function inOperationNames(OperationConfigurationInterface $operation) |
||
| 531 | |||
| 532 | /** |
||
| 533 | * Set's the Magento installation directory. |
||
| 534 | * |
||
| 535 | * @param string $installationDir The Magento installation directory |
||
| 536 | * |
||
| 537 | * @return void |
||
| 538 | */ |
||
| 539 | public function setInstallationDir($installationDir) |
||
| 543 | |||
| 544 | /** |
||
| 545 | * Return's the Magento installation directory. |
||
| 546 | * |
||
| 547 | * @return string The Magento installation directory |
||
| 548 | */ |
||
| 549 | public function getInstallationDir() |
||
| 553 | |||
| 554 | /** |
||
| 555 | * Set's the source directory that has to be watched for new files. |
||
| 556 | * |
||
| 557 | * @param string $sourceDir The source directory |
||
| 558 | * |
||
| 559 | * @return void |
||
| 560 | */ |
||
| 561 | public function setSourceDir($sourceDir) |
||
| 565 | |||
| 566 | /** |
||
| 567 | * Return's the source directory that has to be watched for new files. |
||
| 568 | * |
||
| 569 | * @return string The source directory |
||
| 570 | */ |
||
| 571 | public function getSourceDir() |
||
| 575 | |||
| 576 | /** |
||
| 577 | * Set's the target directory with the files that has been imported. |
||
| 578 | * |
||
| 579 | * @param string $targetDir The target directory |
||
| 580 | * |
||
| 581 | * @return void |
||
| 582 | */ |
||
| 583 | public function setTargetDir($targetDir) |
||
| 587 | |||
| 588 | /** |
||
| 589 | * Return's the target directory with the files that has been imported. |
||
| 590 | * |
||
| 591 | * @return string The target directory |
||
| 592 | */ |
||
| 593 | public function getTargetDir() |
||
| 597 | |||
| 598 | /** |
||
| 599 | * Set's the Magento edition, EE or CE. |
||
| 600 | * |
||
| 601 | * @param string $magentoEdition The Magento edition |
||
| 602 | * |
||
| 603 | * @return void |
||
| 604 | */ |
||
| 605 | public function setMagentoEdition($magentoEdition) |
||
| 609 | |||
| 610 | /** |
||
| 611 | * Return's the Magento edition, EE or CE. |
||
| 612 | * |
||
| 613 | * @return string The Magento edition |
||
| 614 | */ |
||
| 615 | public function getMagentoEdition() |
||
| 619 | |||
| 620 | /** |
||
| 621 | * Return's the Magento version, e. g. 2.1.0. |
||
| 622 | * |
||
| 623 | * @param string $magentoVersion The Magento version |
||
| 624 | * |
||
| 625 | * @return void |
||
| 626 | */ |
||
| 627 | public function setMagentoVersion($magentoVersion) |
||
| 631 | |||
| 632 | /** |
||
| 633 | * Return's the Magento version, e. g. 2.1.0. |
||
| 634 | * |
||
| 635 | * @return string The Magento version |
||
| 636 | */ |
||
| 637 | public function getMagentoVersion() |
||
| 641 | |||
| 642 | /** |
||
| 643 | * Return's the entity type code to be used. |
||
| 644 | * |
||
| 645 | * @return string The entity type code to be used |
||
| 646 | */ |
||
| 647 | public function getEntityTypeCode() |
||
| 651 | |||
| 652 | /** |
||
| 653 | * Set's the entity type code to be used. |
||
| 654 | * |
||
| 655 | * @param string $entityTypeCode The entity type code |
||
| 656 | * |
||
| 657 | * @return void |
||
| 658 | */ |
||
| 659 | public function setEntityTypeCode($entityTypeCode) |
||
| 663 | |||
| 664 | /** |
||
| 665 | * Return's the multiple field delimiter character to use, default value is comma (,). |
||
| 666 | * |
||
| 667 | * @return string The multiple field delimiter character |
||
| 668 | */ |
||
| 669 | public function getMultipleFieldDelimiter() |
||
| 673 | |||
| 674 | /** |
||
| 675 | * Return's the multiple value delimiter character to use, default value is comma (|). |
||
| 676 | * |
||
| 677 | * @return string The multiple value delimiter character |
||
| 678 | */ |
||
| 679 | public function getMultipleValueDelimiter() |
||
| 683 | |||
| 684 | /** |
||
| 685 | * Queries whether or not strict mode is enabled or not, default is TRUE. |
||
| 686 | * |
||
| 687 | * @return boolean TRUE if strict mode is enabled, else FALSE |
||
| 688 | */ |
||
| 689 | public function isStrictMode() |
||
| 693 | |||
| 694 | /** |
||
| 695 | * Remove's all configured database configuration. |
||
| 696 | * |
||
| 697 | * @return void |
||
| 698 | */ |
||
| 699 | public function clearDatabases() |
||
| 703 | |||
| 704 | /** |
||
| 705 | * Add's the passed database configuration. |
||
| 706 | * |
||
| 707 | * @param \TechDivision\Import\Configuration\DatabaseConfigurationInterface $database The database configuration |
||
| 708 | * |
||
| 709 | * @return void |
||
| 710 | */ |
||
| 711 | public function addDatabase(DatabaseConfigurationInterface $database) |
||
| 715 | |||
| 716 | /** |
||
| 717 | * Return's the number database configurations. |
||
| 718 | * |
||
| 719 | * @return integer The number of database configurations |
||
| 720 | */ |
||
| 721 | public function countDatabases() |
||
| 725 | |||
| 726 | /** |
||
| 727 | * Return's the database configuration with the passed ID. |
||
| 728 | * |
||
| 729 | * @param string $id The ID of the database connection to return |
||
| 730 | * |
||
| 731 | * @return \TechDivision\Import\Configuration\DatabaseConfigurationInterface The database configuration |
||
| 732 | * @throws \Exception Is thrown, if no database configuration is available |
||
| 733 | */ |
||
| 734 | public function getDatabaseById($id) |
||
| 748 | |||
| 749 | /** |
||
| 750 | * Return's the databases for the given type. |
||
| 751 | * |
||
| 752 | * @param string $type The database type to return the configurations for |
||
| 753 | * |
||
| 754 | * @return \Doctrine\Common\Collections\Collection The collection with the database configurations |
||
| 755 | */ |
||
| 756 | public function getDatabasesByType($type) |
||
| 773 | |||
| 774 | /** |
||
| 775 | * Query's whether or not the passed database configuration has a valid type. |
||
| 776 | * |
||
| 777 | * @param \TechDivision\Import\Configuration\DatabaseConfigurationInterface $database The database configuration |
||
| 778 | * |
||
| 779 | * @return boolean TRUE if the passed database configuration has a valid type, else FALSE |
||
| 780 | */ |
||
| 781 | protected function isValidDatabaseType(DatabaseConfigurationInterface $database) |
||
| 785 | |||
| 786 | /** |
||
| 787 | * Return's the database configuration. |
||
| 788 | * |
||
| 789 | * If an explicit DB ID is specified, the method tries to return the database with this ID. If |
||
| 790 | * the database configuration is NOT available, an execption is thrown. |
||
| 791 | * |
||
| 792 | * If no explicit DB ID is specified, the method tries to return the default database configuration, |
||
| 793 | * if not available the first one. |
||
| 794 | * |
||
| 795 | * @return \TechDivision\Import\Configuration\DatabaseConfigurationInterface The database configuration |
||
| 796 | * @throws \Exception Is thrown, if no database configuration is available |
||
| 797 | */ |
||
| 798 | public function getDatabase() |
||
| 822 | |||
| 823 | /** |
||
| 824 | * Return's the ArrayCollection with the configured operations. |
||
| 825 | * |
||
| 826 | * @return \Doctrine\Common\Collections\ArrayCollection The ArrayCollection with the operations |
||
| 827 | */ |
||
| 828 | public function getOperations() |
||
| 832 | |||
| 833 | /** |
||
| 834 | * Return's the ArrayCollection with the configured shortcuts. |
||
| 835 | * |
||
| 836 | * @return \Doctrine\Common\Collections\ArrayCollection The ArrayCollection with the shortcuts |
||
| 837 | */ |
||
| 838 | public function getShortcuts() |
||
| 842 | |||
| 843 | /** |
||
| 844 | * Return's the ArrayCollection with the configured loggers. |
||
| 845 | * |
||
| 846 | * @return \Doctrine\Common\Collections\ArrayCollection The ArrayCollection with the loggers |
||
| 847 | */ |
||
| 848 | public function getLoggers() |
||
| 852 | |||
| 853 | /** |
||
| 854 | * Set's the flag that import artefacts have to be archived or not. |
||
| 855 | * |
||
| 856 | * @param boolean $archiveArtefacts TRUE if artefacts have to be archived, else FALSE |
||
| 857 | * |
||
| 858 | * @return void |
||
| 859 | */ |
||
| 860 | public function setArchiveArtefacts($archiveArtefacts) |
||
| 864 | |||
| 865 | /** |
||
| 866 | * Return's the TRUE if the import artefacts have to be archived. |
||
| 867 | * |
||
| 868 | * @return boolean TRUE if the import artefacts have to be archived |
||
| 869 | */ |
||
| 870 | public function haveArchiveArtefacts() |
||
| 874 | |||
| 875 | /** |
||
| 876 | * The directory where the archives will be stored. |
||
| 877 | * |
||
| 878 | * @param string $archiveDir The archive directory |
||
| 879 | * |
||
| 880 | * @return void |
||
| 881 | */ |
||
| 882 | public function setArchiveDir($archiveDir) |
||
| 886 | |||
| 887 | /** |
||
| 888 | * The directory where the archives will be stored. |
||
| 889 | * |
||
| 890 | * @return string The archive directory |
||
| 891 | */ |
||
| 892 | public function getArchiveDir() |
||
| 896 | |||
| 897 | /** |
||
| 898 | * Set's the debug mode. |
||
| 899 | * |
||
| 900 | * @param boolean $debugMode TRUE if debug mode is enabled, else FALSE |
||
| 901 | * |
||
| 902 | * @return void |
||
| 903 | */ |
||
| 904 | public function setDebugMode($debugMode) |
||
| 908 | |||
| 909 | /** |
||
| 910 | * Queries whether or not debug mode is enabled or not, default is TRUE. |
||
| 911 | * |
||
| 912 | * @return boolean TRUE if debug mode is enabled, else FALSE |
||
| 913 | */ |
||
| 914 | public function isDebugMode() |
||
| 918 | |||
| 919 | /** |
||
| 920 | * Set's the log level to use. |
||
| 921 | * |
||
| 922 | * @param string $logLevel The log level to use |
||
| 923 | * |
||
| 924 | * @return void |
||
| 925 | */ |
||
| 926 | public function setLogLevel($logLevel) |
||
| 930 | |||
| 931 | /** |
||
| 932 | * Return's the log level to use. |
||
| 933 | * |
||
| 934 | * @return string The log level to use |
||
| 935 | */ |
||
| 936 | public function getLogLevel() |
||
| 940 | |||
| 941 | /** |
||
| 942 | * Set's the explicit DB ID to use. |
||
| 943 | * |
||
| 944 | * @param string $useDbId The explicit DB ID to use |
||
| 945 | * |
||
| 946 | * @return void |
||
| 947 | */ |
||
| 948 | public function setUseDbId($useDbId) |
||
| 952 | |||
| 953 | /** |
||
| 954 | * Return's the explicit DB ID to use. |
||
| 955 | * |
||
| 956 | * @return string The explicit DB ID to use |
||
| 957 | */ |
||
| 958 | public function getUseDbId() |
||
| 962 | |||
| 963 | /** |
||
| 964 | * Set's the PID filename to use. |
||
| 965 | * |
||
| 966 | * @param string $pidFilename The PID filename to use |
||
| 967 | * |
||
| 968 | * @return void |
||
| 969 | */ |
||
| 970 | public function setPidFilename($pidFilename) |
||
| 974 | |||
| 975 | /** |
||
| 976 | * Return's the PID filename to use. |
||
| 977 | * |
||
| 978 | * @return string The PID filename to use |
||
| 979 | */ |
||
| 980 | public function getPidFilename() |
||
| 984 | |||
| 985 | /** |
||
| 986 | * Set's the systemm name to be used. |
||
| 987 | * |
||
| 988 | * @param string $systemName The system name to be used |
||
| 989 | * |
||
| 990 | * @return void |
||
| 991 | */ |
||
| 992 | public function setSystemName($systemName) |
||
| 996 | |||
| 997 | /** |
||
| 998 | * Return's the systemm name to be used. |
||
| 999 | * |
||
| 1000 | * @return string The system name to be used |
||
| 1001 | */ |
||
| 1002 | public function getSystemName() |
||
| 1006 | |||
| 1007 | /** |
||
| 1008 | * Set's the collection with the path of the Magento Edition specific extension libraries. |
||
| 1009 | * |
||
| 1010 | * @param array $extensionLibraries The paths of the Magento Edition specific extension libraries |
||
| 1011 | * |
||
| 1012 | * @return void |
||
| 1013 | */ |
||
| 1014 | public function setExtensionLibraries(array $extensionLibraries) |
||
| 1018 | |||
| 1019 | /** |
||
| 1020 | * Return's an array with the path of the Magento Edition specific extension libraries. |
||
| 1021 | * |
||
| 1022 | * @return array The paths of the Magento Edition specific extension libraries |
||
| 1023 | */ |
||
| 1024 | public function getExtensionLibraries() |
||
| 1028 | |||
| 1029 | /** |
||
| 1030 | * Return's a collection with the path to additional vendor directories. |
||
| 1031 | * |
||
| 1032 | * @return \Doctrine\Common\Collections\ArrayCollection The paths to additional vendor directories |
||
| 1033 | */ |
||
| 1034 | public function getAdditionalVendorDirs() |
||
| 1038 | |||
| 1039 | /** |
||
| 1040 | * The array with the subject's custom header mappings. |
||
| 1041 | * |
||
| 1042 | * @return array The custom header mappings |
||
| 1043 | */ |
||
| 1044 | public function getHeaderMappings() |
||
| 1058 | |||
| 1059 | /** |
||
| 1060 | * The array with the subject's custom image types. |
||
| 1061 | * |
||
| 1062 | * @return array The custom image types |
||
| 1063 | */ |
||
| 1064 | public function getImageTypes() |
||
| 1078 | |||
| 1079 | /** |
||
| 1080 | * Set's the flag that decides whether or not the import should be wrapped within a single transaction. |
||
| 1081 | * |
||
| 1082 | * @param boolean $singleTransaction TRUE if the import should be wrapped in a single transation, else FALSE |
||
| 1083 | * |
||
| 1084 | * @return void |
||
| 1085 | */ |
||
| 1086 | public function setSingleTransaction($singleTransaction) |
||
| 1090 | |||
| 1091 | /** |
||
| 1092 | * Whether or not the import should be wrapped within a single transation. |
||
| 1093 | * |
||
| 1094 | * @return boolean TRUE if the import should be wrapped in a single transation, else FALSE |
||
| 1095 | */ |
||
| 1096 | public function isSingleTransaction() |
||
| 1100 | |||
| 1101 | /** |
||
| 1102 | * Set's the flag that decides whether or not the the cache has been enabled. |
||
| 1103 | * |
||
| 1104 | * @param boolean $cacheEnabled TRUE if the cache has been enabled, else FALSE |
||
| 1105 | * |
||
| 1106 | * @return void |
||
| 1107 | */ |
||
| 1108 | public function setCacheEnabled($cacheEnabled) |
||
| 1112 | |||
| 1113 | /** |
||
| 1114 | * Whether or not the cache functionality should be enabled. |
||
| 1115 | * |
||
| 1116 | * @return boolean TRUE if the cache has to be enabled, else FALSE |
||
| 1117 | */ |
||
| 1118 | public function isCacheEnabled() |
||
| 1122 | |||
| 1123 | /** |
||
| 1124 | * Set's the passed serial from the commandline to the configuration. |
||
| 1125 | * |
||
| 1126 | * @param string $serial The serial from the commandline |
||
| 1127 | * |
||
| 1128 | * @return void |
||
| 1129 | */ |
||
| 1130 | public function setSerial($serial) |
||
| 1134 | |||
| 1135 | /** |
||
| 1136 | * Return's the serial from the commandline. |
||
| 1137 | * |
||
| 1138 | * @return string The serial |
||
| 1139 | */ |
||
| 1140 | public function getSerial() |
||
| 1144 | |||
| 1145 | /** |
||
| 1146 | * Return's the configuration for the caches. |
||
| 1147 | * |
||
| 1148 | * @return \Doctrine\Common\Collections\ArrayCollection The cache configurations |
||
| 1149 | */ |
||
| 1150 | public function getCaches() |
||
| 1161 | |||
| 1162 | /** |
||
| 1163 | * Return's the cache configuration for the passed type. |
||
| 1164 | * |
||
| 1165 | * @param string $type The cache type to return the configuation for |
||
| 1166 | * |
||
| 1167 | * @return \TechDivision\Import\Configuration\CacheConfigurationInterface The cache configuration |
||
| 1168 | */ |
||
| 1169 | public function getCacheByType($type) |
||
| 1183 | |||
| 1184 | /** |
||
| 1185 | * Return's the alias configuration. |
||
| 1186 | * |
||
| 1187 | * @return \Doctrine\Common\Collections\ArrayCollection The alias configuration |
||
| 1188 | */ |
||
| 1189 | public function getAliases() |
||
| 1193 | |||
| 1194 | /** |
||
| 1195 | * Set's the prefix for the move files subject. |
||
| 1196 | * |
||
| 1197 | * @param string $moveFilesPrefix The prefix for the move files subject |
||
| 1198 | * |
||
| 1199 | * @return void |
||
| 1200 | */ |
||
| 1201 | public function setMoveFilesPrefix($moveFilesPrefix) |
||
| 1205 | |||
| 1206 | /** |
||
| 1207 | * Return's the prefix for the move files subject. |
||
| 1208 | * |
||
| 1209 | * @return string The prefix for the move files subject |
||
| 1210 | * |
||
| 1211 | * @return string The prefix for the move files subject |
||
| 1212 | */ |
||
| 1213 | public function getMoveFilesPrefix() |
||
| 1217 | |||
| 1218 | /** |
||
| 1219 | * Set's the flag that whether the files have to be moved from the source to the target directory or not. |
||
| 1220 | * |
||
| 1221 | * @param boolean $moveFiles TRUE if the files should be moved, else FALSE |
||
| 1222 | * |
||
| 1223 | * return void |
||
| 1224 | */ |
||
| 1225 | public function setMoveFiles($moveFiles) |
||
| 1229 | |||
| 1230 | /** |
||
| 1231 | * Whether or not the files should be moved from the source to the target directory. |
||
| 1232 | * |
||
| 1233 | * @return TRUE if the files should be moved, FALSE otherwise |
||
| 1234 | */ |
||
| 1235 | public function shouldMoveFiles() |
||
| 1239 | |||
| 1240 | /** |
||
| 1241 | * Set's the flag that whether the configuration files have to be compiled or not. |
||
| 1242 | * |
||
| 1243 | * @param boolean $compile TRUE if the configuration files have to be compiled, else FALSE |
||
| 1244 | * |
||
| 1245 | * return void |
||
| 1246 | */ |
||
| 1247 | public function setCompile($compile) |
||
| 1251 | |||
| 1252 | /** |
||
| 1253 | * Whether or not the configuration files have to be compiled or not. |
||
| 1254 | * |
||
| 1255 | * @return TRUE if the configuration files have to be compiled, FALSE otherwise |
||
| 1256 | */ |
||
| 1257 | public function shouldCompile() |
||
| 1261 | |||
| 1262 | /** |
||
| 1263 | * Set's the shortcut that maps the operation names that has to be executed. |
||
| 1264 | * |
||
| 1265 | * @param string $shortcut The shortcut |
||
| 1266 | */ |
||
| 1267 | public function setShortcut($shortcut) |
||
| 1271 | |||
| 1272 | /** |
||
| 1273 | * Return's the shortcut that maps the operation names that has to be executed. |
||
| 1274 | * |
||
| 1275 | * @return string The shortcut |
||
| 1276 | */ |
||
| 1277 | public function getShortcut() |
||
| 1281 | } |
||
| 1282 |