Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.
Common duplication problems, and corresponding solutions are:
Complex classes like AbstractSubject 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 AbstractSubject, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 47 | abstract class AbstractSubject implements SubjectInterface |
||
| 48 | { |
||
| 49 | |||
| 50 | /** |
||
| 51 | * The trait that provides basic filesystem handling functionality. |
||
| 52 | * |
||
| 53 | * @var TechDivision\Import\Subjects\FilesystemTrait |
||
| 54 | */ |
||
| 55 | use FilesystemTrait; |
||
| 56 | |||
| 57 | /** |
||
| 58 | * The trait that provides basic filesystem handling functionality. |
||
| 59 | * |
||
| 60 | * @var TechDivision\Import\SystemLoggerTrait |
||
| 61 | */ |
||
| 62 | use SystemLoggerTrait; |
||
| 63 | |||
| 64 | /** |
||
| 65 | * The trait that provides header handling functionality. |
||
| 66 | * |
||
| 67 | * @var TechDivision\Import\HeaderTrait |
||
| 68 | */ |
||
| 69 | use HeaderTrait; |
||
| 70 | |||
| 71 | /** |
||
| 72 | * The trait that provides row handling functionality. |
||
| 73 | * |
||
| 74 | * @var TechDivision\Import\RowTrait |
||
| 75 | */ |
||
| 76 | use RowTrait; |
||
| 77 | |||
| 78 | /** |
||
| 79 | * The name of the file to be imported. |
||
| 80 | * |
||
| 81 | * @var string |
||
| 82 | */ |
||
| 83 | protected $filename; |
||
| 84 | |||
| 85 | /** |
||
| 86 | * The actual line number. |
||
| 87 | * |
||
| 88 | * @var integer |
||
| 89 | */ |
||
| 90 | protected $lineNumber = 0; |
||
| 91 | |||
| 92 | /** |
||
| 93 | * The actual operation name. |
||
| 94 | * |
||
| 95 | * @var string |
||
| 96 | */ |
||
| 97 | protected $operationName ; |
||
| 98 | |||
| 99 | /** |
||
| 100 | * The flag that stop's overserver execution on the actual row. |
||
| 101 | * |
||
| 102 | * @var boolean |
||
| 103 | */ |
||
| 104 | protected $skipRow = false; |
||
| 105 | |||
| 106 | /** |
||
| 107 | * The import adapter instance. |
||
| 108 | * |
||
| 109 | * @var \TechDivision\Import\Adapter\ImportAdapterInterface |
||
| 110 | */ |
||
| 111 | protected $importAdapter; |
||
| 112 | |||
| 113 | /** |
||
| 114 | * The system configuration. |
||
| 115 | * |
||
| 116 | * @var \TechDivision\Import\Configuration\SubjectConfigurationInterface |
||
| 117 | */ |
||
| 118 | protected $configuration; |
||
| 119 | |||
| 120 | /** |
||
| 121 | * The RegistryProcessor instance to handle running threads. |
||
| 122 | * |
||
| 123 | * @var \TechDivision\Import\Services\RegistryProcessorInterface |
||
| 124 | */ |
||
| 125 | protected $registryProcessor; |
||
| 126 | |||
| 127 | /** |
||
| 128 | * The actions unique serial. |
||
| 129 | * |
||
| 130 | * @var string |
||
| 131 | */ |
||
| 132 | protected $serial; |
||
| 133 | |||
| 134 | /** |
||
| 135 | * Array with the subject's observers. |
||
| 136 | * |
||
| 137 | * @var array |
||
| 138 | */ |
||
| 139 | protected $observers = array(); |
||
| 140 | |||
| 141 | /** |
||
| 142 | * Array with the subject's callbacks. |
||
| 143 | * |
||
| 144 | * @var array |
||
| 145 | */ |
||
| 146 | protected $callbacks = array(); |
||
| 147 | |||
| 148 | /** |
||
| 149 | * The subject's callback mappings. |
||
| 150 | * |
||
| 151 | * @var array |
||
| 152 | */ |
||
| 153 | protected $callbackMappings = array(); |
||
| 154 | |||
| 155 | /** |
||
| 156 | * The available root categories. |
||
| 157 | * |
||
| 158 | * @var array |
||
| 159 | */ |
||
| 160 | protected $rootCategories = array(); |
||
| 161 | |||
| 162 | /** |
||
| 163 | * The Magento configuration. |
||
| 164 | * |
||
| 165 | * @var array |
||
| 166 | */ |
||
| 167 | protected $coreConfigData = array(); |
||
| 168 | |||
| 169 | /** |
||
| 170 | * The available stores. |
||
| 171 | * |
||
| 172 | * @var array |
||
| 173 | */ |
||
| 174 | protected $stores = array(); |
||
| 175 | |||
| 176 | /** |
||
| 177 | * The available websites. |
||
| 178 | * |
||
| 179 | * @var array |
||
| 180 | */ |
||
| 181 | protected $storeWebsites = array(); |
||
| 182 | |||
| 183 | /** |
||
| 184 | * The default store. |
||
| 185 | * |
||
| 186 | * @var array |
||
| 187 | */ |
||
| 188 | protected $defaultStore; |
||
| 189 | |||
| 190 | /** |
||
| 191 | * The store view code the create the product/attributes for. |
||
| 192 | * |
||
| 193 | * @var string |
||
| 194 | */ |
||
| 195 | protected $storeViewCode; |
||
| 196 | |||
| 197 | /** |
||
| 198 | * The UID generator for the core config data. |
||
| 199 | * |
||
| 200 | * @var \TechDivision\Import\Utils\Generators\GeneratorInterface |
||
| 201 | */ |
||
| 202 | protected $coreConfigDataUidGenerator; |
||
| 203 | |||
| 204 | /** |
||
| 205 | * Initialize the subject instance. |
||
| 206 | * |
||
| 207 | * @param \TechDivision\Import\Services\RegistryProcessorInterface $registryProcessor The registry processor instance |
||
| 208 | * @param \TechDivision\Import\Utils\Generators\GeneratorInterface $coreConfigDataUidGenerator The UID generator for the core config data |
||
| 209 | * @param array $systemLoggers The array with the system loggers instances |
||
| 210 | */ |
||
| 211 | 77 | public function __construct( |
|
| 220 | |||
| 221 | /** |
||
| 222 | * Set's the name of the file to import |
||
| 223 | * |
||
| 224 | * @param string $filename The filename |
||
| 225 | * |
||
| 226 | * @return void |
||
| 227 | */ |
||
| 228 | 10 | public function setFilename($filename) |
|
| 232 | |||
| 233 | /** |
||
| 234 | * Return's the name of the file to import. |
||
| 235 | * |
||
| 236 | * @return string The filename |
||
| 237 | */ |
||
| 238 | 8 | public function getFilename() |
|
| 242 | |||
| 243 | /** |
||
| 244 | * Set's the actual operation name. |
||
| 245 | * |
||
| 246 | * @param string $operationName The actual operation name |
||
| 247 | * |
||
| 248 | * @return void |
||
| 249 | */ |
||
| 250 | 1 | public function setOperationName($operationName) |
|
| 254 | |||
| 255 | /** |
||
| 256 | * Return's the actual operation name. |
||
| 257 | * |
||
| 258 | * @return string |
||
| 259 | */ |
||
| 260 | 1 | public function getOperationName() |
|
| 264 | |||
| 265 | /** |
||
| 266 | * Set's the actual line number. |
||
| 267 | * |
||
| 268 | * @param integer $lineNumber The line number |
||
| 269 | * |
||
| 270 | * @return void |
||
| 271 | */ |
||
| 272 | 1 | public function setLineNumber($lineNumber) |
|
| 276 | |||
| 277 | /** |
||
| 278 | * Return's the actual line number. |
||
| 279 | * |
||
| 280 | * @return integer The line number |
||
| 281 | */ |
||
| 282 | 9 | public function getLineNumber() |
|
| 286 | |||
| 287 | /** |
||
| 288 | * Stop's observer execution on the actual row. |
||
| 289 | * |
||
| 290 | * @return void |
||
| 291 | */ |
||
| 292 | 1 | public function skipRow() |
|
| 296 | |||
| 297 | /** |
||
| 298 | * Return's the default callback mappings. |
||
| 299 | * |
||
| 300 | * @return array The default callback mappings |
||
| 301 | */ |
||
| 302 | 1 | public function getDefaultCallbackMappings() |
|
| 306 | |||
| 307 | /** |
||
| 308 | * Tries to format the passed value to a valid date with format 'Y-m-d H:i:s'. |
||
| 309 | * If the passed value is NOT a valid date, NULL will be returned. |
||
| 310 | * |
||
| 311 | * @param string $value The value to format |
||
| 312 | * |
||
| 313 | * @return string|null The formatted date or NULL if the date is not valid |
||
| 314 | */ |
||
| 315 | 2 | public function formatDate($value) |
|
| 326 | |||
| 327 | /** |
||
| 328 | * Extracts the elements of the passed value by exploding them |
||
| 329 | * with the also passed delimiter. |
||
| 330 | * |
||
| 331 | * @param string $value The value to extract |
||
| 332 | * @param string|null $delimiter The delimiter used to extrace the elements |
||
| 333 | * |
||
| 334 | * @return array The exploded values |
||
| 335 | */ |
||
| 336 | 2 | public function explode($value, $delimiter = null) |
|
| 349 | |||
| 350 | /** |
||
| 351 | * Queries whether or not debug mode is enabled or not, default is TRUE. |
||
| 352 | * |
||
| 353 | * @return boolean TRUE if debug mode is enabled, else FALSE |
||
| 354 | */ |
||
| 355 | 1 | public function isDebugMode() |
|
| 359 | |||
| 360 | /** |
||
| 361 | * Set's the subject configuration. |
||
| 362 | * |
||
| 363 | * @param \TechDivision\Import\Configuration\SubjectConfigurationInterface $configuration The subject configuration |
||
| 364 | * |
||
| 365 | * @return void |
||
| 366 | */ |
||
| 367 | 77 | public function setConfiguration(SubjectConfigurationInterface $configuration) |
|
| 371 | |||
| 372 | /** |
||
| 373 | * Return's the subject configuration. |
||
| 374 | * |
||
| 375 | * @return \TechDivision\Import\Configuration\SubjectConfigurationInterface The subject configuration |
||
| 376 | */ |
||
| 377 | 77 | public function getConfiguration() |
|
| 381 | |||
| 382 | /** |
||
| 383 | * Set's the import adapter instance. |
||
| 384 | * |
||
| 385 | * @param \TechDivision\Import\Adapter\ImportAdapterInterface $importAdapter The import adapter instance |
||
| 386 | * |
||
| 387 | * @return void |
||
| 388 | */ |
||
| 389 | 3 | public function setImportAdapter(ImportAdapterInterface $importAdapter) |
|
| 393 | |||
| 394 | /** |
||
| 395 | * Return's the import adapter instance. |
||
| 396 | * |
||
| 397 | * @return \TechDivision\Import\Adapter\ImportAdapterInterface The import adapter instance |
||
| 398 | */ |
||
| 399 | 3 | public function getImportAdapter() |
|
| 403 | |||
| 404 | /** |
||
| 405 | * Return's the RegistryProcessor instance to handle the running threads. |
||
| 406 | * |
||
| 407 | * @return \TechDivision\Import\Services\RegistryProcessorInterface The registry processor instance |
||
| 408 | */ |
||
| 409 | 77 | public function getRegistryProcessor() |
|
| 413 | |||
| 414 | /** |
||
| 415 | * Set's the unique serial for this import process. |
||
| 416 | * |
||
| 417 | * @param string $serial The unique serial |
||
| 418 | * |
||
| 419 | * @return void |
||
| 420 | */ |
||
| 421 | 9 | public function setSerial($serial) |
|
| 425 | |||
| 426 | /** |
||
| 427 | * Return's the unique serial for this import process. |
||
| 428 | * |
||
| 429 | * @return string The unique serial |
||
| 430 | */ |
||
| 431 | 4 | public function getSerial() |
|
| 435 | |||
| 436 | /** |
||
| 437 | * Return's the source date format to use. |
||
| 438 | * |
||
| 439 | * @return string The source date format |
||
| 440 | */ |
||
| 441 | 4 | public function getSourceDateFormat() |
|
| 445 | |||
| 446 | /** |
||
| 447 | * Return's the multiple field delimiter character to use, default value is comma (,). |
||
| 448 | * |
||
| 449 | * @return string The multiple field delimiter character |
||
| 450 | */ |
||
| 451 | 1 | public function getMultipleFieldDelimiter() |
|
| 455 | |||
| 456 | /** |
||
| 457 | * Return's the multiple value delimiter character to use, default value is comma (|). |
||
| 458 | * |
||
| 459 | * @return string The multiple value delimiter character |
||
| 460 | */ |
||
| 461 | 1 | public function getMultipleValueDelimiter() |
|
| 465 | |||
| 466 | /** |
||
| 467 | * Intializes the previously loaded global data for exactly one bunch. |
||
| 468 | * |
||
| 469 | * @param string $serial The serial of the actual import |
||
| 470 | * |
||
| 471 | * @return void |
||
| 472 | */ |
||
| 473 | 77 | public function setUp($serial) |
|
| 508 | |||
| 509 | /** |
||
| 510 | * Clean up the global data after importing the variants. |
||
| 511 | * |
||
| 512 | * @param string $serial The serial of the actual import |
||
| 513 | * |
||
| 514 | * @return void |
||
| 515 | */ |
||
| 516 | 1 | public function tearDown($serial) |
|
| 533 | |||
| 534 | /** |
||
| 535 | * Return's the target directory for the artefact export. |
||
| 536 | * |
||
| 537 | * @return string The target directory for the artefact export |
||
| 538 | */ |
||
| 539 | 1 | public function getTargetDir() |
|
| 543 | |||
| 544 | /** |
||
| 545 | * Return's the next source directory, which will be the target directory |
||
| 546 | * of this subject, in most cases. |
||
| 547 | * |
||
| 548 | * @param string $serial The serial of the actual import |
||
| 549 | * |
||
| 550 | * @return string The new source directory |
||
| 551 | */ |
||
| 552 | 4 | public function getNewSourceDir($serial) |
|
| 556 | |||
| 557 | /** |
||
| 558 | * Register the passed observer with the specific type. |
||
| 559 | * |
||
| 560 | * @param \TechDivision\Import\Observers\ObserverInterface $observer The observer to register |
||
| 561 | * @param string $type The type to register the observer with |
||
| 562 | * |
||
| 563 | * @return void |
||
| 564 | */ |
||
| 565 | 6 | public function registerObserver(ObserverInterface $observer, $type) |
|
| 577 | |||
| 578 | /** |
||
| 579 | * Register the passed callback with the specific type. |
||
| 580 | * |
||
| 581 | * @param \TechDivision\Import\Callbacks\CallbackInterface $callback The subject to register the callbacks for |
||
| 582 | * @param string $type The type to register the callback with |
||
| 583 | * |
||
| 584 | * @return void |
||
| 585 | */ |
||
| 586 | 2 | public function registerCallback(CallbackInterface $callback, $type) |
|
| 598 | |||
| 599 | /** |
||
| 600 | * Return's the array with callbacks for the passed type. |
||
| 601 | * |
||
| 602 | * @param string $type The type of the callbacks to return |
||
| 603 | * |
||
| 604 | * @return array The callbacks |
||
| 605 | */ |
||
| 606 | 1 | public function getCallbacksByType($type) |
|
| 620 | |||
| 621 | /** |
||
| 622 | * Return's the array with the available observers. |
||
| 623 | * |
||
| 624 | * @return array The observers |
||
| 625 | */ |
||
| 626 | 6 | public function getObservers() |
|
| 630 | |||
| 631 | /** |
||
| 632 | * Return's the array with the available callbacks. |
||
| 633 | * |
||
| 634 | * @return array The callbacks |
||
| 635 | */ |
||
| 636 | 1 | public function getCallbacks() |
|
| 640 | |||
| 641 | /** |
||
| 642 | * Return's the callback mappings for this subject. |
||
| 643 | * |
||
| 644 | * @return array The array with the subject's callback mappings |
||
| 645 | */ |
||
| 646 | 2 | public function getCallbackMappings() |
|
| 650 | |||
| 651 | /** |
||
| 652 | * Imports the content of the file with the passed filename. |
||
| 653 | * |
||
| 654 | * |
||
| 655 | * @param string $serial The serial of the actual import |
||
| 656 | * @param string $filename The filename to process |
||
| 657 | * |
||
| 658 | * @return void |
||
| 659 | * @throws \Exception Is thrown, if the import can't be processed |
||
| 660 | */ |
||
| 661 | 5 | public function import($serial, $filename) |
|
| 727 | |||
| 728 | /** |
||
| 729 | * This method queries whether or not the passed filename matches |
||
| 730 | * the pattern, based on the subjects configured prefix. |
||
| 731 | * |
||
| 732 | * @param string $filename The filename to match |
||
| 733 | * |
||
| 734 | * @return boolean TRUE if the filename matches, else FALSE |
||
| 735 | */ |
||
| 736 | 5 | protected function match($filename) |
|
| 749 | |||
| 750 | /** |
||
| 751 | * Imports the passed row into the database. If the import failed, the exception |
||
| 752 | * will be catched and logged, but the import process will be continued. |
||
| 753 | * |
||
| 754 | * @param array $row The row with the data to be imported |
||
| 755 | * |
||
| 756 | * @return void |
||
| 757 | */ |
||
| 758 | 7 | public function importRow(array $row) |
|
| 802 | |||
| 803 | /** |
||
| 804 | * Map the passed attribute code, if a header mapping exists and return the |
||
| 805 | * mapped mapping. |
||
| 806 | * |
||
| 807 | * @param string $attributeCode The attribute code to map |
||
| 808 | * |
||
| 809 | * @return string The mapped attribute code, or the original one |
||
| 810 | */ |
||
| 811 | 2 | public function mapAttributeCodeByHeaderMapping($attributeCode) |
|
| 825 | |||
| 826 | /** |
||
| 827 | * Queries whether or not that the subject needs an OK file to be processed. |
||
| 828 | * |
||
| 829 | * @return boolean TRUE if the subject needs an OK file, else FALSE |
||
| 830 | */ |
||
| 831 | 1 | public function isOkFileNeeded() |
|
| 835 | |||
| 836 | /** |
||
| 837 | * Return's the default store. |
||
| 838 | * |
||
| 839 | * @return array The default store |
||
| 840 | */ |
||
| 841 | 4 | public function getDefaultStore() |
|
| 845 | |||
| 846 | /** |
||
| 847 | * Set's the store view code the create the product/attributes for. |
||
| 848 | * |
||
| 849 | * @param string $storeViewCode The store view code |
||
| 850 | * |
||
| 851 | * @return void |
||
| 852 | */ |
||
| 853 | 4 | public function setStoreViewCode($storeViewCode) |
|
| 857 | |||
| 858 | /** |
||
| 859 | * Return's the store view code the create the product/attributes for. |
||
| 860 | * |
||
| 861 | * @param string|null $default The default value to return, if the store view code has not been set |
||
| 862 | * |
||
| 863 | * @return string The store view code |
||
| 864 | */ |
||
| 865 | 8 | public function getStoreViewCode($default = null) |
|
| 879 | |||
| 880 | /** |
||
| 881 | * Return's the store ID of the store with the passed store view code |
||
| 882 | * |
||
| 883 | * @param string $storeViewCode The store view code to return the store ID for |
||
| 884 | * |
||
| 885 | * @return integer The ID of the store with the passed ID |
||
| 886 | * @throws \Exception Is thrown, if the store with the actual code is not available |
||
| 887 | */ |
||
| 888 | 4 | public function getStoreId($storeViewCode) |
|
| 906 | |||
| 907 | /** |
||
| 908 | * Return's the store ID of the actual row, or of the default store |
||
| 909 | * if no store view code is set in the CSV file. |
||
| 910 | * |
||
| 911 | * @param string|null $default The default store view code to use, if no store view code is set in the CSV file |
||
| 912 | * |
||
| 913 | * @return integer The ID of the actual store |
||
| 914 | * @throws \Exception Is thrown, if the store with the actual code is not available |
||
| 915 | */ |
||
| 916 | 2 | public function getRowStoreId($default = null) |
|
| 928 | |||
| 929 | /** |
||
| 930 | * Prepare's the store view code in the subject. |
||
| 931 | * |
||
| 932 | * @return void |
||
| 933 | */ |
||
| 934 | 2 | public function prepareStoreViewCode() |
|
| 945 | |||
| 946 | /** |
||
| 947 | * Return's the root category for the actual view store. |
||
| 948 | * |
||
| 949 | * @return array The store's root category |
||
| 950 | * @throws \Exception Is thrown if the root category for the passed store code is NOT available |
||
| 951 | */ |
||
| 952 | 2 | public function getRootCategory() |
|
| 969 | |||
| 970 | /** |
||
| 971 | * Return's the Magento configuration value. |
||
| 972 | * |
||
| 973 | * @param string $path The Magento path of the requested configuration value |
||
| 974 | * @param mixed $default The default value that has to be returned, if the requested configuration value is not set |
||
| 975 | * @param string $scope The scope the configuration value has been set |
||
| 976 | * @param integer $scopeId The scope ID the configuration value has been set |
||
| 977 | * |
||
| 978 | * @return mixed The configuration value |
||
| 979 | * @throws \Exception Is thrown, if nor a value can be found or a default value has been passed |
||
| 980 | */ |
||
| 981 | 5 | public function getCoreConfigData($path, $default = null, $scope = ScopeKeys::SCOPE_DEFAULT, $scopeId = 0) |
|
| 1057 | |||
| 1058 | /** |
||
| 1059 | * Resolve the original column name for the passed one. |
||
| 1060 | * |
||
| 1061 | * @param string $columnName The column name that has to be resolved |
||
| 1062 | * |
||
| 1063 | * @return string|null The original column name |
||
| 1064 | */ |
||
| 1065 | 2 | public function resolveOriginalColumnName($columnName) |
|
| 1087 | |||
| 1088 | /** |
||
| 1089 | * Return's the original data if available, or an empty array. |
||
| 1090 | * |
||
| 1091 | * @return array The original data |
||
| 1092 | */ |
||
| 1093 | 2 | public function getOriginalData() |
|
| 1108 | |||
| 1109 | /** |
||
| 1110 | * Query's whether or not the actual column contains original data like |
||
| 1111 | * filename, line number and column names. |
||
| 1112 | * |
||
| 1113 | * @return boolean TRUE if the actual column contains origin data, else FALSE |
||
| 1114 | */ |
||
| 1115 | 3 | public function hasOriginalData() |
|
| 1119 | |||
| 1120 | /** |
||
| 1121 | * Wraps the passed exeception into a new one by trying to resolve the original filname, |
||
| 1122 | * line number and column names and use it for a detailed exception message. |
||
| 1123 | * |
||
| 1124 | * @param array $columnNames The column names that should be resolved and wrapped |
||
| 1125 | * @param \Exception $parent The exception we want to wrap |
||
| 1126 | * @param string $className The class name of the exception type we want to wrap the parent one |
||
| 1127 | * |
||
| 1128 | * @return \Exception the wrapped exception |
||
| 1129 | */ |
||
| 1130 | 2 | public function wrapException( |
|
| 1175 | |||
| 1176 | /** |
||
| 1177 | * Strip's the exception suffix containing filename and line number from the |
||
| 1178 | * passed message. |
||
| 1179 | * |
||
| 1180 | * @param string $message The message to strip the exception suffix from |
||
| 1181 | * |
||
| 1182 | * @return mixed The message without the exception suffix |
||
| 1183 | */ |
||
| 1184 | 2 | public function stripExceptionSuffix($message) |
|
| 1188 | |||
| 1189 | /** |
||
| 1190 | * Append's the exception suffix containing filename and line number to the |
||
| 1191 | * passed message. If no message has been passed, only the suffix will be |
||
| 1192 | * returned |
||
| 1193 | * |
||
| 1194 | * @param string|null $message The message to append the exception suffix to |
||
| 1195 | * @param string|null $filename The filename used to create the suffix |
||
| 1196 | * @param string|null $lineNumber The line number used to create the suffx |
||
| 1197 | * |
||
| 1198 | * @return string The message with the appended exception suffix |
||
| 1199 | */ |
||
| 1200 | 7 | public function appendExceptionSuffix($message = null, $filename = null, $lineNumber = null) |
|
| 1221 | |||
| 1222 | /** |
||
| 1223 | * Raises the value for the counter with the passed key by one. |
||
| 1224 | * |
||
| 1225 | * @param mixed $counterName The name of the counter to raise |
||
| 1226 | * |
||
| 1227 | * @return integer The counter's new value |
||
| 1228 | */ |
||
| 1229 | 1 | public function raiseCounter($counterName) |
|
| 1238 | |||
| 1239 | /** |
||
| 1240 | * Merge the passed array into the status of the actual import. |
||
| 1241 | * |
||
| 1242 | * @param array $status The status information to be merged |
||
| 1243 | * |
||
| 1244 | * @return void |
||
| 1245 | */ |
||
| 1246 | 1 | public function mergeAttributesRecursive(array $status) |
|
| 1255 | } |
||
| 1256 |