Complex classes like ProductBunchProcessor 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 ProductBunchProcessor, and based on these observations, apply Extract Interface, too.
| 1 | <?php |
||
| 59 | class ProductBunchProcessor implements ProductBunchProcessorInterface |
||
| 60 | { |
||
| 61 | |||
| 62 | /** |
||
| 63 | * A PDO connection initialized with the values from the Doctrine EntityManager. |
||
| 64 | * |
||
| 65 | * @var \PDO |
||
| 66 | */ |
||
| 67 | protected $connection; |
||
| 68 | |||
| 69 | /** |
||
| 70 | * The repository to access EAV attribute option values. |
||
| 71 | * |
||
| 72 | * @var \TechDivision\Import\Product\Repositories\EavAttributeOptionValueRepository |
||
| 73 | */ |
||
| 74 | protected $eavAttributeOptionValueRepository; |
||
| 75 | |||
| 76 | /** |
||
| 77 | * The repository to access EAV attributes. |
||
| 78 | * |
||
| 79 | * @var \TechDivision\Import\Repositories\EavAttributeRepository |
||
| 80 | */ |
||
| 81 | protected $eavAttributeRepository; |
||
| 82 | |||
| 83 | /** |
||
| 84 | * The action for product CRUD methods. |
||
| 85 | * |
||
| 86 | * @var \TechDivision\Import\Product\Actions\ProductAction |
||
| 87 | */ |
||
| 88 | protected $productAction; |
||
| 89 | |||
| 90 | /** |
||
| 91 | * The action for product varchar attribute CRUD methods. |
||
| 92 | * |
||
| 93 | * @var \TechDivision\Import\Product\Actions\ProductVarcharAction |
||
| 94 | */ |
||
| 95 | protected $productVarcharAction; |
||
| 96 | |||
| 97 | /** |
||
| 98 | * The action for product text attribute CRUD methods. |
||
| 99 | * |
||
| 100 | * @var \TechDivision\Import\Product\Actions\ProductTextAction |
||
| 101 | */ |
||
| 102 | protected $productTextAction; |
||
| 103 | |||
| 104 | /** |
||
| 105 | * The action for product int attribute CRUD methods. |
||
| 106 | * |
||
| 107 | * @var \TechDivision\Import\Product\Actions\ProductIntAction |
||
| 108 | */ |
||
| 109 | protected $productIntAction; |
||
| 110 | |||
| 111 | /** |
||
| 112 | * The action for product decimal attribute CRUD methods. |
||
| 113 | * |
||
| 114 | * @var \TechDivision\Import\Product\Actions\ProductDecimalAction |
||
| 115 | */ |
||
| 116 | protected $productDecimalAction; |
||
| 117 | |||
| 118 | /** |
||
| 119 | * The action for product datetime attribute CRUD methods. |
||
| 120 | * |
||
| 121 | * @var \TechDivision\Import\Product\Actions\ProductDatetimeAction |
||
| 122 | */ |
||
| 123 | protected $productDatetimeAction; |
||
| 124 | |||
| 125 | /** |
||
| 126 | * The action for product website CRUD methods. |
||
| 127 | * |
||
| 128 | * @var \TechDivision\Import\Product\Actions\ProductWebsiteAction |
||
| 129 | */ |
||
| 130 | protected $productWebsiteAction; |
||
| 131 | |||
| 132 | /** |
||
| 133 | * The action for category product relation CRUD methods. |
||
| 134 | * |
||
| 135 | * @var \TechDivision\Import\Product\Actions\CategoryProductAction |
||
| 136 | */ |
||
| 137 | protected $categoryProductAction; |
||
| 138 | |||
| 139 | /** |
||
| 140 | * The action for stock item CRUD methods. |
||
| 141 | * |
||
| 142 | * @var \TechDivision\Import\Product\Actions\StockItemAction |
||
| 143 | */ |
||
| 144 | protected $stockItemAction; |
||
| 145 | |||
| 146 | /** |
||
| 147 | * The action for stock status CRUD methods. |
||
| 148 | * |
||
| 149 | * @var \TechDivision\Import\Product\Actions\StockStatusAction |
||
| 150 | */ |
||
| 151 | protected $stockStatusAction; |
||
| 152 | |||
| 153 | /** |
||
| 154 | * The action for URL rewrite CRUD methods. |
||
| 155 | * |
||
| 156 | * @var \TechDivision\Import\Actions\UrlRewriteAction |
||
| 157 | */ |
||
| 158 | protected $urlRewriteAction; |
||
| 159 | |||
| 160 | /** |
||
| 161 | * The action for URL rewrite product category CRUD methods. |
||
| 162 | * |
||
| 163 | * @var \TechDivision\Import\Product\Actions\UrlRewriteProductCategoryAction |
||
| 164 | */ |
||
| 165 | protected $urlRewriteProductCategoryAction; |
||
| 166 | |||
| 167 | /** |
||
| 168 | * The repository to load the products with. |
||
| 169 | * |
||
| 170 | * @var \TechDivision\Import\Product\Repositories\ProductRepository |
||
| 171 | */ |
||
| 172 | protected $productRepository; |
||
| 173 | |||
| 174 | /** |
||
| 175 | * The repository to load the product website relations with. |
||
| 176 | * |
||
| 177 | * @var \TechDivision\Import\Product\Repositories\ProductWebsiteRepository |
||
| 178 | */ |
||
| 179 | protected $productWebsiteRepository; |
||
| 180 | |||
| 181 | /** |
||
| 182 | * The repository to load the product datetime attribute with. |
||
| 183 | * |
||
| 184 | * @var \TechDivision\Import\Product\Repositories\ProductDatetimeRepository |
||
| 185 | */ |
||
| 186 | protected $productDatetimeRepository; |
||
| 187 | |||
| 188 | /** |
||
| 189 | * The repository to load the product decimal attribute with. |
||
| 190 | * |
||
| 191 | * @var \TechDivision\Import\Product\Repositories\ProductDecimalRepository |
||
| 192 | */ |
||
| 193 | protected $productDecimalRepository; |
||
| 194 | |||
| 195 | /** |
||
| 196 | * The repository to load the product integer attribute with. |
||
| 197 | * |
||
| 198 | * @var \TechDivision\Import\Product\Repositories\ProductIntRepository |
||
| 199 | */ |
||
| 200 | protected $productIntRepository; |
||
| 201 | |||
| 202 | /** |
||
| 203 | * The repository to load the product text attribute with. |
||
| 204 | * |
||
| 205 | * @var \TechDivision\Import\Product\Repositories\ProductTextRepository |
||
| 206 | */ |
||
| 207 | protected $productTextRepository; |
||
| 208 | |||
| 209 | /** |
||
| 210 | * The repository to load the product varchar attribute with. |
||
| 211 | * |
||
| 212 | * @var \TechDivision\Import\Product\Repositories\ProductVarcharRepository |
||
| 213 | */ |
||
| 214 | protected $productVarcharRepository; |
||
| 215 | |||
| 216 | /** |
||
| 217 | * The repository to load the category product relations with. |
||
| 218 | * |
||
| 219 | * @var \TechDivision\Import\Product\Repositories\CategoryProductRepository |
||
| 220 | */ |
||
| 221 | protected $categoryProductRepository; |
||
| 222 | |||
| 223 | /** |
||
| 224 | * The repository to load the stock status with. |
||
| 225 | * |
||
| 226 | * @var \TechDivision\Import\Product\Repositories\StockStatusRepository |
||
| 227 | */ |
||
| 228 | protected $stockStatusRepository; |
||
| 229 | |||
| 230 | /** |
||
| 231 | * The repository to load the stock item with. |
||
| 232 | * |
||
| 233 | * @var \TechDivision\Import\Product\Repositories\StockItemRepository |
||
| 234 | */ |
||
| 235 | protected $stockItemRepository; |
||
| 236 | |||
| 237 | /** |
||
| 238 | * The repository to load the URL rewrites with. |
||
| 239 | * |
||
| 240 | * @var \TechDivision\Import\Repositories\UrlRewriteRepository |
||
| 241 | */ |
||
| 242 | protected $urlRewriteRepository; |
||
| 243 | |||
| 244 | /** |
||
| 245 | * The repository to load the URL rewrite product category relations with. |
||
| 246 | * |
||
| 247 | * @var \TechDivision\Import\Product\Repositories\UrlRewriteProductCategoryRepository |
||
| 248 | */ |
||
| 249 | protected $urlRewriteProductCategoryRepository; |
||
| 250 | |||
| 251 | /** |
||
| 252 | * Initialize the processor with the necessary assembler and repository instances. |
||
| 253 | * |
||
| 254 | * @param \PDO $connection The PDO connection to use |
||
| 255 | * @param \TechDivision\Import\Product\Repositories\ProductRepository $productRepository The product repository to use |
||
| 256 | * @param \TechDivision\Import\Product\Repositories\ProductWebsiteRepository $productWebsiteRepository The product website repository to use |
||
| 257 | * @param \TechDivision\Import\Product\Repositories\ProductDatetimeRepository $productDatetimeRepository The product datetime repository to use |
||
| 258 | * @param \TechDivision\Import\Product\Repositories\ProductDecimalRepository $productDecimalRepository The product decimal repository to use |
||
| 259 | * @param \TechDivision\Import\Product\Repositories\ProductIntRepository $productIntRepository The product integer repository to use |
||
| 260 | * @param \TechDivision\Import\Product\Repositories\ProductTextRepository $productTextRepository The product text repository to use |
||
| 261 | * @param \TechDivision\Import\Product\Repositories\ProductVarcharRepository $productVarcharRepository The product varchar repository to use |
||
| 262 | * @param \TechDivision\Import\Product\Repositories\CategoryProductRepository $categoryProductRepository The category product repository to use |
||
| 263 | * @param \TechDivision\Import\Product\Repositories\StockStatusRepository $stockStatusRepository The stock status repository to use |
||
| 264 | * @param \TechDivision\Import\Product\Repositories\StockItemRepository $stockItemRepository The stock item repository to use |
||
| 265 | * @param \TechDivision\Import\Repositories\UrlRewriteRepository $urlRewriteRepository The URL rewrite repository to use |
||
| 266 | * @param \TechDivision\Import\Repositories\UrlRewriteRepository $urlRewriteProductCategoryRepository The URL rewrite product category repository to use |
||
| 267 | * @param \TechDivision\Import\Product\Repositories\EavAttributeOptionValueRepository $eavAttributeOptionValueRepository The EAV attribute option value repository to use |
||
| 268 | * @param \TechDivision\Import\Repositories\EavAttributeRepository $eavAttributeRepository The EAV attribute repository to use |
||
| 269 | * @param \TechDivision\Import\Product\Actions\CategoryProductAction $categoryProductAction The category product action to use |
||
| 270 | * @param \TechDivision\Import\Product\Actions\ProductDatetimeAction $productDatetimeAction The product datetime action to use |
||
| 271 | * @param \TechDivision\Import\Product\Actions\ProductDecimalAction $productDecimalAction The product decimal action to use |
||
| 272 | * @param \TechDivision\Import\Product\Actions\ProductIntAction $productIntAction The product integer action to use |
||
| 273 | * @param \TechDivision\Import\Product\Actions\ProductAction $productAction The product action to use |
||
| 274 | * @param \TechDivision\Import\Product\Actions\ProductTextAction $productTextAction The product text action to use |
||
| 275 | * @param \TechDivision\Import\Product\Actions\ProductVarcharAction $productVarcharAction The product varchar action to use |
||
| 276 | * @param \TechDivision\Import\Product\Actions\ProductWebsiteAction $productWebsiteAction The product website action to use |
||
| 277 | * @param \TechDivision\Import\Product\Actions\StockItemAction $stockItemAction The stock item action to use |
||
| 278 | * @param \TechDivision\Import\Product\Actions\StockStatusAction $stockStatusAction The stock status action to use |
||
| 279 | * @param \TechDivision\Import\Actions\UrlRewriteAction $urlRewriteAction The URL rewrite action to use |
||
| 280 | * @param \TechDivision\Import\Product\Actions\UrlRewriteProductCategoryAction $urlRewriteProductCategoryAction The URL rewrite product category action to use |
||
| 281 | */ |
||
| 282 | public function __construct( |
||
| 339 | |||
| 340 | /** |
||
| 341 | * Set's the passed connection. |
||
| 342 | * |
||
| 343 | * @param \PDO $connection The connection to set |
||
| 344 | * |
||
| 345 | * @return void |
||
| 346 | */ |
||
| 347 | public function setConnection(\PDO $connection) |
||
| 351 | |||
| 352 | /** |
||
| 353 | * Return's the connection. |
||
| 354 | * |
||
| 355 | * @return \PDO The connection instance |
||
| 356 | */ |
||
| 357 | public function getConnection() |
||
| 361 | |||
| 362 | /** |
||
| 363 | * Turns off autocommit mode. While autocommit mode is turned off, changes made to the database via the PDO |
||
| 364 | * object instance are not committed until you end the transaction by calling ProductProcessor::commit(). |
||
| 365 | * Calling ProductProcessor::rollBack() will roll back all changes to the database and return the connection |
||
| 366 | * to autocommit mode. |
||
| 367 | * |
||
| 368 | * @return boolean Returns TRUE on success or FALSE on failure |
||
| 369 | * @link http://php.net/manual/en/pdo.begintransaction.php |
||
| 370 | */ |
||
| 371 | public function beginTransaction() |
||
| 375 | |||
| 376 | /** |
||
| 377 | * Commits a transaction, returning the database connection to autocommit mode until the next call to |
||
| 378 | * ProductProcessor::beginTransaction() starts a new transaction. |
||
| 379 | * |
||
| 380 | * @return boolean Returns TRUE on success or FALSE on failure |
||
| 381 | * @link http://php.net/manual/en/pdo.commit.php |
||
| 382 | */ |
||
| 383 | public function commit() |
||
| 387 | |||
| 388 | /** |
||
| 389 | * Rolls back the current transaction, as initiated by ProductProcessor::beginTransaction(). |
||
| 390 | * |
||
| 391 | * If the database was set to autocommit mode, this function will restore autocommit mode after it has |
||
| 392 | * rolled back the transaction. |
||
| 393 | * |
||
| 394 | * Some databases, including MySQL, automatically issue an implicit COMMIT when a database definition |
||
| 395 | * language (DDL) statement such as DROP TABLE or CREATE TABLE is issued within a transaction. The implicit |
||
| 396 | * COMMIT will prevent you from rolling back any other changes within the transaction boundary. |
||
| 397 | * |
||
| 398 | * @return boolean Returns TRUE on success or FALSE on failure |
||
| 399 | * @link http://php.net/manual/en/pdo.rollback.php |
||
| 400 | */ |
||
| 401 | public function rollBack() |
||
| 405 | |||
| 406 | /** |
||
| 407 | * Set's the repository to access EAV attribute option values. |
||
| 408 | * |
||
| 409 | * @param \TechDivision\Import\Product\Repositories\EavAttributeOptionValueRepository $eavAttributeOptionValueRepository The repository to access EAV attribute option values |
||
| 410 | * |
||
| 411 | * @return void |
||
| 412 | */ |
||
| 413 | public function setEavAttributeOptionValueRepository($eavAttributeOptionValueRepository) |
||
| 417 | |||
| 418 | /** |
||
| 419 | * Return's the repository to access EAV attribute option values. |
||
| 420 | * |
||
| 421 | * @return \TechDivision\Import\Product\Repositories\EavAttributeOptionValueRepository The repository instance |
||
| 422 | */ |
||
| 423 | public function getEavAttributeOptionValueRepository() |
||
| 427 | |||
| 428 | /** |
||
| 429 | * Set's the repository to access EAV attributes. |
||
| 430 | * |
||
| 431 | * @param \TechDivision\Import\Repositories\EavAttributeRepository $eavAttributeRepository The repository to access EAV attributes |
||
| 432 | * |
||
| 433 | * @return void |
||
| 434 | */ |
||
| 435 | public function setEavAttributeRepository($eavAttributeRepository) |
||
| 439 | |||
| 440 | /** |
||
| 441 | * Return's the repository to access EAV attributes. |
||
| 442 | * |
||
| 443 | * @return \TechDivision\Import\Repositories\EavAttributeRepository The repository instance |
||
| 444 | */ |
||
| 445 | public function getEavAttributeRepository() |
||
| 449 | |||
| 450 | /** |
||
| 451 | * Return's an array with the available EAV attributes for the passed is user defined flag. |
||
| 452 | * |
||
| 453 | * @param integer $isUserDefined The flag itself |
||
| 454 | * |
||
| 455 | * @return array The array with the EAV attributes matching the passed flag |
||
| 456 | */ |
||
| 457 | public function getEavAttributeByIsUserDefined($isUserDefined = 1) |
||
| 461 | |||
| 462 | /** |
||
| 463 | * Set's the action with the product CRUD methods. |
||
| 464 | * |
||
| 465 | * @param \TechDivision\Import\Product\Actions\ProductAction $productAction The action with the product CRUD methods |
||
| 466 | * |
||
| 467 | * @return void |
||
| 468 | */ |
||
| 469 | public function setProductAction($productAction) |
||
| 473 | |||
| 474 | /** |
||
| 475 | * Return's the action with the product CRUD methods. |
||
| 476 | * |
||
| 477 | * @return \TechDivision\Import\Product\Actions\ProductAction The action instance |
||
| 478 | */ |
||
| 479 | public function getProductAction() |
||
| 483 | |||
| 484 | /** |
||
| 485 | * Set's the action with the product varchar attribute CRUD methods. |
||
| 486 | * |
||
| 487 | * @param \TechDivision\Import\Product\Actions\ProductVarcharAction $productVarcharAction The action with the product varchar attriute CRUD methods |
||
| 488 | * |
||
| 489 | * @return void |
||
| 490 | */ |
||
| 491 | public function setProductVarcharAction($productVarcharAction) |
||
| 495 | |||
| 496 | /** |
||
| 497 | * Return's the action with the product varchar attribute CRUD methods. |
||
| 498 | * |
||
| 499 | * @return \TechDivision\Import\Product\Actions\ProductVarcharAction The action instance |
||
| 500 | */ |
||
| 501 | public function getProductVarcharAction() |
||
| 505 | |||
| 506 | /** |
||
| 507 | * Set's the action with the product text attribute CRUD methods. |
||
| 508 | * |
||
| 509 | * @param \TechDivision\Import\Product\Actions\ProductTextAction $productTextAction The action with the product text attriute CRUD methods |
||
| 510 | * |
||
| 511 | * @return void |
||
| 512 | */ |
||
| 513 | public function setProductTextAction($productTextAction) |
||
| 517 | |||
| 518 | /** |
||
| 519 | * Return's the action with the product text attribute CRUD methods. |
||
| 520 | * |
||
| 521 | * @return \TechDivision\Import\Product\Actions\ProductTextAction The action instance |
||
| 522 | */ |
||
| 523 | public function getProductTextAction() |
||
| 527 | |||
| 528 | /** |
||
| 529 | * Set's the action with the product int attribute CRUD methods. |
||
| 530 | * |
||
| 531 | * @param \TechDivision\Import\Product\Actions\ProductIntAction $productIntAction The action with the product int attriute CRUD methods |
||
| 532 | * |
||
| 533 | * @return void |
||
| 534 | */ |
||
| 535 | public function setProductIntAction($productIntAction) |
||
| 539 | |||
| 540 | /** |
||
| 541 | * Return's the action with the product int attribute CRUD methods. |
||
| 542 | * |
||
| 543 | * @return \TechDivision\Import\Product\Actions\ProductIntAction The action instance |
||
| 544 | */ |
||
| 545 | public function getProductIntAction() |
||
| 549 | |||
| 550 | /** |
||
| 551 | * Set's the action with the product decimal attribute CRUD methods. |
||
| 552 | * |
||
| 553 | * @param \TechDivision\Import\Product\Actions\ProductDecimalAction $productDecimalAction The action with the product decimal attriute CRUD methods |
||
| 554 | * |
||
| 555 | * @return void |
||
| 556 | */ |
||
| 557 | public function setProductDecimalAction($productDecimalAction) |
||
| 561 | |||
| 562 | /** |
||
| 563 | * Return's the action with the product decimal attribute CRUD methods. |
||
| 564 | * |
||
| 565 | * @return \TechDivision\Import\Product\Actions\ProductDecimalAction The action instance |
||
| 566 | */ |
||
| 567 | public function getProductDecimalAction() |
||
| 571 | |||
| 572 | /** |
||
| 573 | * Set's the action with the product datetime attribute CRUD methods. |
||
| 574 | * |
||
| 575 | * @param \TechDivision\Import\Product\Actions\ProductDatetimeAction $productDatetimeAction The action with the product datetime attriute CRUD methods |
||
| 576 | * |
||
| 577 | * @return void |
||
| 578 | */ |
||
| 579 | public function setProductDatetimeAction($productDatetimeAction) |
||
| 583 | |||
| 584 | /** |
||
| 585 | * Return's the action with the product datetime attribute CRUD methods. |
||
| 586 | * |
||
| 587 | * @return \TechDivision\Import\Product\Actions\ProductDatetimeAction The action instance |
||
| 588 | */ |
||
| 589 | public function getProductDatetimeAction() |
||
| 593 | |||
| 594 | /** |
||
| 595 | * Set's the action with the product website CRUD methods. |
||
| 596 | * |
||
| 597 | * @param \TechDivision\Import\Product\Actions\ProductWebsiteAction $productWebsiteAction The action with the product website CRUD methods |
||
| 598 | * |
||
| 599 | * @return void |
||
| 600 | */ |
||
| 601 | public function setProductWebsiteAction($productWebsiteAction) |
||
| 605 | |||
| 606 | /** |
||
| 607 | * Return's the action with the product website CRUD methods. |
||
| 608 | * |
||
| 609 | * @return \TechDivision\Import\Product\Actions\ProductWebsiteAction The action instance |
||
| 610 | */ |
||
| 611 | public function getProductWebsiteAction() |
||
| 615 | |||
| 616 | /** |
||
| 617 | * Set's the action with the category product relation CRUD methods. |
||
| 618 | * |
||
| 619 | * @param \TechDivision\Import\Product\Actions\ProductCategoryAction $categoryProductAction The action with the category product relation CRUD methods |
||
| 620 | * |
||
| 621 | * @return void |
||
| 622 | */ |
||
| 623 | public function setCategoryProductAction($categoryProductAction) |
||
| 627 | |||
| 628 | /** |
||
| 629 | * Return's the action with the category product relation CRUD methods. |
||
| 630 | * |
||
| 631 | * @return \TechDivision\Import\Product\Actions\CategoryProductAction The action instance |
||
| 632 | */ |
||
| 633 | public function getCategoryProductAction() |
||
| 637 | |||
| 638 | /** |
||
| 639 | * Set's the action with the stock item CRUD methods. |
||
| 640 | * |
||
| 641 | * @param \TechDivision\Import\Product\Actions\StockItemAction $stockItemAction The action with the stock item CRUD methods |
||
| 642 | * |
||
| 643 | * @return void |
||
| 644 | */ |
||
| 645 | public function setStockItemAction($stockItemAction) |
||
| 649 | |||
| 650 | /** |
||
| 651 | * Return's the action with the stock item CRUD methods. |
||
| 652 | * |
||
| 653 | * @return \TechDivision\Import\Product\Actions\StockItemAction The action instance |
||
| 654 | */ |
||
| 655 | public function getStockItemAction() |
||
| 659 | |||
| 660 | /** |
||
| 661 | * Set's the action with the stock status CRUD methods. |
||
| 662 | * |
||
| 663 | * @param \TechDivision\Import\Product\Actions\StockStatusAction $stockStatusAction The action with the stock status CRUD methods |
||
| 664 | * |
||
| 665 | * @return void |
||
| 666 | */ |
||
| 667 | public function setStockStatusAction($stockStatusAction) |
||
| 671 | |||
| 672 | /** |
||
| 673 | * Return's the action with the stock status CRUD methods. |
||
| 674 | * |
||
| 675 | * @return \TechDivision\Import\Product\Actions\StockStatusAction The action instance |
||
| 676 | */ |
||
| 677 | public function getStockStatusAction() |
||
| 681 | |||
| 682 | /** |
||
| 683 | * Set's the action with the URL rewrite CRUD methods. |
||
| 684 | * |
||
| 685 | * @param \TechDivision\Import\Actions\UrlRewriteAction $urlRewriteAction The action with the URL rewrite CRUD methods |
||
| 686 | * |
||
| 687 | * @return void |
||
| 688 | */ |
||
| 689 | public function setUrlRewriteAction($urlRewriteAction) |
||
| 693 | |||
| 694 | /** |
||
| 695 | * Return's the action with the URL rewrite CRUD methods. |
||
| 696 | * |
||
| 697 | * @return \TechDivision\Import\Actions\UrlRewriteAction The action instance |
||
| 698 | */ |
||
| 699 | public function getUrlRewriteAction() |
||
| 703 | |||
| 704 | /** |
||
| 705 | * Set's the action with the URL rewrite product category CRUD methods. |
||
| 706 | * |
||
| 707 | * @param \TechDivision\Import\Product\Actions\UrlRewriteAction $urlRewriteProductCategoryAction The action with the URL rewrite CRUD methods |
||
| 708 | * |
||
| 709 | * @return void |
||
| 710 | */ |
||
| 711 | public function setUrlRewriteProductCategoryAction($urlRewriteProductCategoryAction) |
||
| 715 | |||
| 716 | /** |
||
| 717 | * Return's the action with the URL rewrite product category CRUD methods. |
||
| 718 | * |
||
| 719 | * @return \TechDivision\Import\Product\Actions\UrlRewriteProductCategoryAction The action instance |
||
| 720 | */ |
||
| 721 | public function getUrlRewriteProductCategoryAction() |
||
| 725 | |||
| 726 | /** |
||
| 727 | * Set's the repository to load the products with. |
||
| 728 | * |
||
| 729 | * @param \TechDivision\Import\Product\Repositories\ProductRepository $productRepository The repository instance |
||
| 730 | * |
||
| 731 | * @return void |
||
| 732 | */ |
||
| 733 | public function setProductRepository($productRepository) |
||
| 737 | |||
| 738 | /** |
||
| 739 | * Return's the repository to load the products with. |
||
| 740 | * |
||
| 741 | * @return \TechDivision\Import\Product\Repositories\ProductRepository The repository instance |
||
| 742 | */ |
||
| 743 | public function getProductRepository() |
||
| 747 | |||
| 748 | /** |
||
| 749 | * Set's the repository to load the product website relations with. |
||
| 750 | * |
||
| 751 | * @param \TechDivision\Import\Product\Repositories\ProductWebsiteRepository $productWebsiteRepository The repository instance |
||
| 752 | * |
||
| 753 | * @return void |
||
| 754 | */ |
||
| 755 | public function setProductWebsiteRepository($productWebsiteRepository) |
||
| 759 | |||
| 760 | /** |
||
| 761 | * Return's the repository to load the product website relations with. |
||
| 762 | * |
||
| 763 | * @return \TechDivision\Import\Product\Repositories\ProductWebsiteRepository The repository instance |
||
| 764 | */ |
||
| 765 | public function getProductWebsiteRepository() |
||
| 769 | |||
| 770 | /** |
||
| 771 | * Set's the repository to load the product datetime attribute with. |
||
| 772 | * |
||
| 773 | * @param \TechDivision\Import\Product\Repositories\ProductDatetimeRepository $productDatetimeRepository The repository instance |
||
| 774 | * |
||
| 775 | * @return void |
||
| 776 | */ |
||
| 777 | public function setProductDatetimeRepository($productDatetimeRepository) |
||
| 781 | |||
| 782 | /** |
||
| 783 | * Return's the repository to load the product datetime attribute with. |
||
| 784 | * |
||
| 785 | * @return \TechDivision\Import\Product\Repositories\ProductDatetimeRepository The repository instance |
||
| 786 | */ |
||
| 787 | public function getProductDatetimeRepository() |
||
| 791 | |||
| 792 | /** |
||
| 793 | * Set's the repository to load the product decimal attribute with. |
||
| 794 | * |
||
| 795 | * @param \TechDivision\Import\Product\Repositories\ProductDecimalRepository $productDecimalRepository The repository instance |
||
| 796 | * |
||
| 797 | * @return void |
||
| 798 | */ |
||
| 799 | public function setProductDecimalRepository($productDecimalRepository) |
||
| 803 | |||
| 804 | /** |
||
| 805 | * Return's the repository to load the product decimal attribute with. |
||
| 806 | * |
||
| 807 | * @return \TechDivision\Import\Product\Repositories\ProductDecimalRepository The repository instance |
||
| 808 | */ |
||
| 809 | public function getProductDecimalRepository() |
||
| 813 | |||
| 814 | /** |
||
| 815 | * Set's the repository to load the product integer attribute with. |
||
| 816 | * |
||
| 817 | * @param \TechDivision\Import\Product\Repositories\ProductIntRepository $productIntRepository The repository instance |
||
| 818 | * |
||
| 819 | * @return void |
||
| 820 | */ |
||
| 821 | public function setProductIntRepository($productIntRepository) |
||
| 825 | |||
| 826 | /** |
||
| 827 | * Return's the repository to load the product integer attribute with. |
||
| 828 | * |
||
| 829 | * @return \TechDivision\Import\Product\Repositories\ProductIntRepository The repository instance |
||
| 830 | */ |
||
| 831 | public function getProductIntRepository() |
||
| 835 | |||
| 836 | /** |
||
| 837 | * Set's the repository to load the product text attribute with. |
||
| 838 | * |
||
| 839 | * @param \TechDivision\Import\Product\Repositories\ProductTextRepository $productTextRepository The repository instance |
||
| 840 | * |
||
| 841 | * @return void |
||
| 842 | */ |
||
| 843 | public function setProductTextRepository($productTextRepository) |
||
| 847 | |||
| 848 | /** |
||
| 849 | * Return's the repository to load the product text attribute with. |
||
| 850 | * |
||
| 851 | * @return \TechDivision\Import\Product\Repositories\ProductTextRepository The repository instance |
||
| 852 | */ |
||
| 853 | public function getProductTextRepository() |
||
| 857 | |||
| 858 | /** |
||
| 859 | * Set's the repository to load the product varchar attribute with. |
||
| 860 | * |
||
| 861 | * @param \TechDivision\Import\Product\Repositories\ProductVarcharRepository $productVarcharRepository The repository instance |
||
| 862 | * |
||
| 863 | * @return void |
||
| 864 | */ |
||
| 865 | public function setProductVarcharRepository($productVarcharRepository) |
||
| 869 | |||
| 870 | /** |
||
| 871 | * Return's the repository to load the product varchar attribute with. |
||
| 872 | * |
||
| 873 | * @return \TechDivision\Import\Product\Repositories\ProductVarcharRepository The repository instance |
||
| 874 | */ |
||
| 875 | public function getProductVarcharRepository() |
||
| 879 | |||
| 880 | /** |
||
| 881 | * Set's the repository to load the category product relations with. |
||
| 882 | * |
||
| 883 | * @param \TechDivision\Import\Product\Repositories\CategoryProductRepository $categoryProductRepository The repository instance |
||
| 884 | * |
||
| 885 | * @return void |
||
| 886 | */ |
||
| 887 | public function setCategoryProductRepository($categoryProductRepository) |
||
| 891 | |||
| 892 | /** |
||
| 893 | * Return's the repository to load the category product relations with. |
||
| 894 | * |
||
| 895 | * @return \TechDivision\Import\Product\Repositories\CategoryProductRepository The repository instance |
||
| 896 | */ |
||
| 897 | public function getCategoryProductRepository() |
||
| 901 | |||
| 902 | /** |
||
| 903 | * Set's the repository to load the stock status with. |
||
| 904 | * |
||
| 905 | * @param \TechDivision\Import\Product\Repositories\StockStatusRepository $stockStatusRepository The repository instance |
||
| 906 | * |
||
| 907 | * @return void |
||
| 908 | */ |
||
| 909 | public function setStockStatusRepository($stockStatusRepository) |
||
| 913 | |||
| 914 | /** |
||
| 915 | * Return's the repository to load the stock status with. |
||
| 916 | * |
||
| 917 | * @return \TechDivision\Import\Product\Repositories\StockStatusRepository The repository instance |
||
| 918 | */ |
||
| 919 | public function getStockStatusRepository() |
||
| 923 | |||
| 924 | /** |
||
| 925 | * Set's the repository to load the stock items with. |
||
| 926 | * |
||
| 927 | * @param \TechDivision\Import\Product\Repositories\StockItemRepository $stockItemRepository The repository instance |
||
| 928 | * |
||
| 929 | * @return void |
||
| 930 | */ |
||
| 931 | public function setStockItemRepository($stockItemRepository) |
||
| 935 | |||
| 936 | /** |
||
| 937 | * Return's the repository to load the stock items with. |
||
| 938 | * |
||
| 939 | * @return \TechDivision\Import\Product\Repositories\StockItemRepository The repository instance |
||
| 940 | */ |
||
| 941 | public function getStockItemRepository() |
||
| 945 | |||
| 946 | /** |
||
| 947 | * Set's the repository to load the URL rewrites with. |
||
| 948 | * |
||
| 949 | * @param \TechDivision\Import\Repositories\UrlRewriteRepository $urlRewriteRepository The repository instance |
||
| 950 | * |
||
| 951 | * @return void |
||
| 952 | */ |
||
| 953 | public function setUrlRewriteRepository($urlRewriteRepository) |
||
| 957 | |||
| 958 | /** |
||
| 959 | * Return's the repository to load the URL rewrites with. |
||
| 960 | * |
||
| 961 | * @return \TechDivision\Import\Repositories\UrlRewriteRepository The repository instance |
||
| 962 | */ |
||
| 963 | public function getUrlRewriteRepository() |
||
| 967 | |||
| 968 | /** |
||
| 969 | * Set's the repository to load the URL rewrite product category relations with. |
||
| 970 | * |
||
| 971 | * @param \TechDivision\Import\Product\Repositories\UrlRewriteProductCategoryRepository $urlRewriteProductCategoryRepository The repository instance |
||
| 972 | * |
||
| 973 | * @return void |
||
| 974 | */ |
||
| 975 | public function setUrlRewriteProductCategoryRepository($urlRewriteProductCategoryRepository) |
||
| 979 | |||
| 980 | /** |
||
| 981 | * Return's the repository to load the URL rewrite product category relations with. |
||
| 982 | * |
||
| 983 | * @return \TechDivision\Import\Product\Repositories\UrlRewriteProductCategoryRepository The repository instance |
||
| 984 | */ |
||
| 985 | public function getUrlRewriteProductCategoryRepository() |
||
| 989 | |||
| 990 | /** |
||
| 991 | * Load's and return's the EAV attribute option value with the passed code, store ID and value. |
||
| 992 | * |
||
| 993 | * @param string $attributeCode The code of the EAV attribute option to load |
||
| 994 | * @param integer $storeId The store ID of the attribute option to load |
||
| 995 | * @param string $value The value of the attribute option to load |
||
| 996 | * |
||
| 997 | * @return array The EAV attribute option value |
||
| 998 | */ |
||
| 999 | public function loadEavAttributeOptionValueByAttributeCodeAndStoreIdAndValue($attributeCode, $storeId, $value) |
||
| 1003 | |||
| 1004 | /** |
||
| 1005 | * Return's the URL rewrites for the passed URL entity type and ID. |
||
| 1006 | * |
||
| 1007 | * @param string $entityType The entity type to load the URL rewrites for |
||
| 1008 | * @param integer $entityId The entity ID to laod the rewrites for |
||
| 1009 | * |
||
| 1010 | * @return array The URL rewrites |
||
| 1011 | */ |
||
| 1012 | public function getUrlRewritesByEntityTypeAndEntityId($entityType, $entityId) |
||
| 1016 | |||
| 1017 | /** |
||
| 1018 | * Load's and return's the product with the passed SKU. |
||
| 1019 | * |
||
| 1020 | * @param string $sku The SKU of the product to load |
||
| 1021 | * |
||
| 1022 | * @return array The product |
||
| 1023 | */ |
||
| 1024 | public function loadProduct($sku) |
||
| 1028 | |||
| 1029 | /** |
||
| 1030 | * Load's and return's the product website relation with the passed product and website ID. |
||
| 1031 | * |
||
| 1032 | * @param string $productId The product ID of the relation |
||
| 1033 | * @param string $websiteId The website ID of the relation |
||
| 1034 | * |
||
| 1035 | * @return array The product website |
||
| 1036 | */ |
||
| 1037 | public function loadProductWebsite($productId, $websiteId) |
||
| 1041 | |||
| 1042 | /** |
||
| 1043 | * Return's the category product relation with the passed category/product ID. |
||
| 1044 | * |
||
| 1045 | * @param integer $categoryId The category ID of the category product relation to return |
||
| 1046 | * @param integer $productId The product ID of the category product relation to return |
||
| 1047 | * |
||
| 1048 | * @return array The category product relation |
||
| 1049 | */ |
||
| 1050 | public function loadCategoryProduct($categoryId, $productId) |
||
| 1054 | |||
| 1055 | /** |
||
| 1056 | * Load's and return's the stock status with the passed product/website/stock ID. |
||
| 1057 | * |
||
| 1058 | * @param integer $productId The product ID of the stock status to load |
||
| 1059 | * @param integer $websiteId The website ID of the stock status to load |
||
| 1060 | * @param integer $stockId The stock ID of the stock status to load |
||
| 1061 | * |
||
| 1062 | * @return array The stock status |
||
| 1063 | */ |
||
| 1064 | public function loadStockStatus($productId, $websiteId, $stockId) |
||
| 1068 | |||
| 1069 | /** |
||
| 1070 | * Load's and return's the stock status with the passed product/website/stock ID. |
||
| 1071 | * |
||
| 1072 | * @param integer $productId The product ID of the stock item to load |
||
| 1073 | * @param integer $websiteId The website ID of the stock item to load |
||
| 1074 | * @param integer $stockId The stock ID of the stock item to load |
||
| 1075 | * |
||
| 1076 | * @return array The stock item |
||
| 1077 | */ |
||
| 1078 | public function loadStockItem($productId, $websiteId, $stockId) |
||
| 1082 | |||
| 1083 | /** |
||
| 1084 | * Load's and return's the datetime attribute with the passed entity/attribute/store ID. |
||
| 1085 | * |
||
| 1086 | * @param integer $entityId The entity ID of the attribute |
||
| 1087 | * @param integer $attributeId The attribute ID of the attribute |
||
| 1088 | * @param integer $storeId The store ID of the attribute |
||
| 1089 | * |
||
| 1090 | * @return array|null The datetime attribute |
||
| 1091 | */ |
||
| 1092 | public function loadProductDatetimeAttribute($entityId, $attributeId, $storeId) |
||
| 1096 | |||
| 1097 | /** |
||
| 1098 | * Load's and return's the decimal attribute with the passed entity/attribute/store ID. |
||
| 1099 | * |
||
| 1100 | * @param integer $entityId The entity ID of the attribute |
||
| 1101 | * @param integer $attributeId The attribute ID of the attribute |
||
| 1102 | * @param integer $storeId The store ID of the attribute |
||
| 1103 | * |
||
| 1104 | * @return array|null The decimal attribute |
||
| 1105 | */ |
||
| 1106 | public function loadProductDecimalAttribute($entityId, $attributeId, $storeId) |
||
| 1110 | |||
| 1111 | /** |
||
| 1112 | * Load's and return's the integer attribute with the passed entity/attribute/store ID. |
||
| 1113 | * |
||
| 1114 | * @param integer $entityId The entity ID of the attribute |
||
| 1115 | * @param integer $attributeId The attribute ID of the attribute |
||
| 1116 | * @param integer $storeId The store ID of the attribute |
||
| 1117 | * |
||
| 1118 | * @return array|null The integer attribute |
||
| 1119 | */ |
||
| 1120 | public function loadProductIntAttribute($entityId, $attributeId, $storeId) |
||
| 1124 | |||
| 1125 | /** |
||
| 1126 | * Load's and return's the text attribute with the passed entity/attribute/store ID. |
||
| 1127 | * |
||
| 1128 | * @param integer $entityId The entity ID of the attribute |
||
| 1129 | * @param integer $attributeId The attribute ID of the attribute |
||
| 1130 | * @param integer $storeId The store ID of the attribute |
||
| 1131 | * |
||
| 1132 | * @return array|null The text attribute |
||
| 1133 | */ |
||
| 1134 | public function loadProductTextAttribute($entityId, $attributeId, $storeId) |
||
| 1138 | |||
| 1139 | /** |
||
| 1140 | * Load's and return's the varchar attribute with the passed entity/attribute/store ID. |
||
| 1141 | * |
||
| 1142 | * @param integer $entityId The entity ID of the attribute |
||
| 1143 | * @param integer $attributeId The attribute ID of the attribute |
||
| 1144 | * @param integer $storeId The store ID of the attribute |
||
| 1145 | * |
||
| 1146 | * @return array|null The varchar attribute |
||
| 1147 | */ |
||
| 1148 | public function loadProductVarcharAttribute($entityId, $attributeId, $storeId) |
||
| 1152 | |||
| 1153 | /** |
||
| 1154 | * Load's and return's the varchar attribute with the passed params. |
||
| 1155 | * |
||
| 1156 | * @param integer $attributeCode The attribute code of the varchar attribute |
||
| 1157 | * @param integer $entityTypeId The entity type ID of the varchar attribute |
||
| 1158 | * @param integer $storeId The store ID of the varchar attribute |
||
| 1159 | * @param string $value The value of the varchar attribute |
||
| 1160 | * |
||
| 1161 | * @return array|null The varchar attribute |
||
| 1162 | */ |
||
| 1163 | public function loadProductVarcharAttributeByAttributeCodeAndEntityTypeIdAndStoreIdAndValue($attributeCode, $entityTypeId, $storeId, $value) |
||
| 1167 | |||
| 1168 | /** |
||
| 1169 | * Return's the URL rewrite product category relation for the passed |
||
| 1170 | * product and category ID. |
||
| 1171 | * |
||
| 1172 | * @param integer $productId The product ID to load the URL rewrite product category relation for |
||
| 1173 | * @param integer $categoryId The category ID to load the URL rewrite product category relation for |
||
| 1174 | * |
||
| 1175 | * @return array|false The URL rewrite product category relations |
||
| 1176 | */ |
||
| 1177 | public function loadUrlRewriteProductCategory($productId, $categoryId) |
||
| 1181 | |||
| 1182 | /** |
||
| 1183 | * Persist's the passed product data and return's the ID. |
||
| 1184 | * |
||
| 1185 | * @param array $product The product data to persist |
||
| 1186 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1187 | * |
||
| 1188 | * @return string The ID of the persisted entity |
||
| 1189 | */ |
||
| 1190 | public function persistProduct($product, $name = null) |
||
| 1194 | |||
| 1195 | /** |
||
| 1196 | * Persist's the passed product varchar attribute. |
||
| 1197 | * |
||
| 1198 | * @param array $attribute The attribute to persist |
||
| 1199 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1200 | * |
||
| 1201 | * @return void |
||
| 1202 | */ |
||
| 1203 | public function persistProductVarcharAttribute($attribute, $name = null) |
||
| 1207 | |||
| 1208 | /** |
||
| 1209 | * Persist's the passed product integer attribute. |
||
| 1210 | * |
||
| 1211 | * @param array $attribute The attribute to persist |
||
| 1212 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1213 | * |
||
| 1214 | * @return void |
||
| 1215 | */ |
||
| 1216 | public function persistProductIntAttribute($attribute, $name = null) |
||
| 1220 | |||
| 1221 | /** |
||
| 1222 | * Persist's the passed product decimal attribute. |
||
| 1223 | * |
||
| 1224 | * @param array $attribute The attribute to persist |
||
| 1225 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1226 | * |
||
| 1227 | * @return void |
||
| 1228 | */ |
||
| 1229 | public function persistProductDecimalAttribute($attribute, $name = null) |
||
| 1233 | |||
| 1234 | /** |
||
| 1235 | * Persist's the passed product datetime attribute. |
||
| 1236 | * |
||
| 1237 | * @param array $attribute The attribute to persist |
||
| 1238 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1239 | * |
||
| 1240 | * @return void |
||
| 1241 | */ |
||
| 1242 | public function persistProductDatetimeAttribute($attribute, $name = null) |
||
| 1246 | |||
| 1247 | /** |
||
| 1248 | * Persist's the passed product text attribute. |
||
| 1249 | * |
||
| 1250 | * @param array $attribute The attribute to persist |
||
| 1251 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1252 | * |
||
| 1253 | * @return void |
||
| 1254 | */ |
||
| 1255 | public function persistProductTextAttribute($attribute, $name = null) |
||
| 1259 | |||
| 1260 | /** |
||
| 1261 | * Persist's the passed product website data and return's the ID. |
||
| 1262 | * |
||
| 1263 | * @param array $productWebsite The product website data to persist |
||
| 1264 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1265 | * |
||
| 1266 | * @return void |
||
| 1267 | */ |
||
| 1268 | public function persistProductWebsite($productWebsite, $name = null) |
||
| 1272 | |||
| 1273 | /** |
||
| 1274 | * Persist's the passed category product relation. |
||
| 1275 | * |
||
| 1276 | * @param array $categoryProduct The category product relation to persist |
||
| 1277 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1278 | * |
||
| 1279 | * @return void |
||
| 1280 | */ |
||
| 1281 | public function persistCategoryProduct($categoryProduct, $name = null) |
||
| 1285 | |||
| 1286 | /** |
||
| 1287 | * Persist's the passed stock item data and return's the ID. |
||
| 1288 | * |
||
| 1289 | * @param array $stockItem The stock item data to persist |
||
| 1290 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1291 | * |
||
| 1292 | * @return void |
||
| 1293 | */ |
||
| 1294 | public function persistStockItem($stockItem, $name = null) |
||
| 1298 | |||
| 1299 | /** |
||
| 1300 | * Persist's the passed stock status data and return's the ID. |
||
| 1301 | * |
||
| 1302 | * @param array $stockStatus The stock status data to persist |
||
| 1303 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1304 | * |
||
| 1305 | * @return void |
||
| 1306 | */ |
||
| 1307 | public function persistStockStatus($stockStatus, $name = null) |
||
| 1311 | |||
| 1312 | /** |
||
| 1313 | * Persist's the URL write with the passed data. |
||
| 1314 | * |
||
| 1315 | * @param array $row The URL rewrite to persist |
||
| 1316 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1317 | * |
||
| 1318 | * @return string The ID of the persisted entity |
||
| 1319 | */ |
||
| 1320 | public function persistUrlRewrite($row, $name = null) |
||
| 1324 | |||
| 1325 | /** |
||
| 1326 | * Persist's the URL rewrite product => category relation with the passed data. |
||
| 1327 | * |
||
| 1328 | * @param array $row The URL rewrite product => category relation to persist |
||
| 1329 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1330 | * |
||
| 1331 | * @return void |
||
| 1332 | */ |
||
| 1333 | public function persistUrlRewriteProductCategory($row, $name = null) |
||
| 1337 | |||
| 1338 | /** |
||
| 1339 | * Delete's the entity with the passed attributes. |
||
| 1340 | * |
||
| 1341 | * @param array $row The attributes of the entity to delete |
||
| 1342 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1343 | * |
||
| 1344 | * @return void |
||
| 1345 | */ |
||
| 1346 | public function deleteProduct($row, $name = null) |
||
| 1350 | |||
| 1351 | /** |
||
| 1352 | * Delete's the URL rewrite with the passed attributes. |
||
| 1353 | * |
||
| 1354 | * @param array $row The attributes of the entity to delete |
||
| 1355 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1356 | * |
||
| 1357 | * @return void |
||
| 1358 | */ |
||
| 1359 | public function deleteUrlRewrite($row, $name = null) |
||
| 1363 | |||
| 1364 | /** |
||
| 1365 | * Delete's the stock item(s) with the passed attributes. |
||
| 1366 | * |
||
| 1367 | * @param array $row The attributes of the entity to delete |
||
| 1368 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1369 | * |
||
| 1370 | * @return void |
||
| 1371 | */ |
||
| 1372 | public function deleteStockItem($row, $name = null) |
||
| 1376 | |||
| 1377 | /** |
||
| 1378 | * Delete's the stock status with the passed attributes. |
||
| 1379 | * |
||
| 1380 | * @param array $row The attributes of the entity to delete |
||
| 1381 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1382 | * |
||
| 1383 | * @return void |
||
| 1384 | */ |
||
| 1385 | public function deleteStockStatus($row, $name = null) |
||
| 1389 | |||
| 1390 | /** |
||
| 1391 | * Delete's the product website relations with the passed attributes. |
||
| 1392 | * |
||
| 1393 | * @param array $row The attributes of the entity to delete |
||
| 1394 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1395 | * |
||
| 1396 | * @return void |
||
| 1397 | */ |
||
| 1398 | public function deleteProductWebsite($row, $name = null) |
||
| 1402 | |||
| 1403 | /** |
||
| 1404 | * Delete's the category product relations with the passed attributes. |
||
| 1405 | * |
||
| 1406 | * @param array $row The attributes of the entity to delete |
||
| 1407 | * @param string|null $name The name of the prepared statement that has to be executed |
||
| 1408 | * |
||
| 1409 | * @return void |
||
| 1410 | */ |
||
| 1411 | public function deleteCategoryProduct($row, $name = null) |
||
| 1415 | } |
||
| 1416 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: