1 | <?php |
||
42 | class ProductVariantProcessor implements ProductVariantProcessorInterface |
||
43 | { |
||
44 | |||
45 | /** |
||
46 | * A PDO connection initialized with the values from the Doctrine EntityManager. |
||
47 | * |
||
48 | * @var \TechDivision\Import\Connection\ConnectionInterface |
||
49 | */ |
||
50 | protected $connection; |
||
51 | |||
52 | /** |
||
53 | * The repository to access product relations. |
||
54 | * |
||
55 | * @var \TechDivision\Import\Product\Repositories\ProductRelationRepositoryInterface |
||
56 | */ |
||
57 | protected $productRelationRepository; |
||
58 | |||
59 | /** |
||
60 | * The repository to access product relations. |
||
61 | * |
||
62 | * @var \TechDivision\Import\Product\Variant\Repositories\ProductSuperLinkRepositoryInterface |
||
63 | */ |
||
64 | protected $productSuperLinkRepository; |
||
65 | |||
66 | /** |
||
67 | * The repository to access product super attributes. |
||
68 | * |
||
69 | * @var \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeRepositoryInterface |
||
70 | */ |
||
71 | protected $productSuperAttributeRepository; |
||
72 | |||
73 | /** |
||
74 | * The repository to access product super attribute labels. |
||
75 | * |
||
76 | * @var \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeLabelRepositoryInterface |
||
77 | */ |
||
78 | protected $productSuperAttributeLabelRepository; |
||
79 | |||
80 | /** |
||
81 | * The repository to access EAV attributes. |
||
82 | * |
||
83 | * @var \TechDivision\Import\Repositories\EavAttributeRepositoryInterface |
||
84 | */ |
||
85 | protected $eavAttributeRepository; |
||
86 | |||
87 | /** |
||
88 | * The repository to access EAV attribute option values. |
||
89 | * |
||
90 | * @var \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface |
||
91 | */ |
||
92 | protected $eavAttributeOptionValueRepository; |
||
93 | |||
94 | /** |
||
95 | * The action for product relation CRUD methods. |
||
96 | * |
||
97 | * @var \TechDivision\Import\Actions\ActionInterface |
||
98 | */ |
||
99 | protected $productRelationAction; |
||
100 | |||
101 | /** |
||
102 | * The action for product super attribute CRUD methods. |
||
103 | * |
||
104 | * @var \TechDivision\Import\Actions\ActionInterface |
||
105 | */ |
||
106 | protected $productSuperAttributeAction; |
||
107 | |||
108 | /** |
||
109 | * The action for product super attribute label CRUD methods. |
||
110 | * |
||
111 | * @var \TechDivision\Import\Actions\ActionInterface |
||
112 | */ |
||
113 | protected $productSuperAttributeLabelAction; |
||
114 | |||
115 | /** |
||
116 | * The action for product super link CRUD methods. |
||
117 | * |
||
118 | * @var \TechDivision\Import\Actions\ActionInterface |
||
119 | */ |
||
120 | protected $productSuperLinkAction; |
||
121 | |||
122 | /** |
||
123 | * The raw entity loader instance. |
||
124 | * |
||
125 | * @var \TechDivision\Import\Loaders\LoaderInterface |
||
126 | */ |
||
127 | protected $rawEntityLoader; |
||
128 | |||
129 | /** |
||
130 | * Initialize the processor with the necessary assembler and repository instances. |
||
131 | * |
||
132 | * @param \TechDivision\Import\Connection\ConnectionInterface $connection The connection to use |
||
133 | * @param \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository The EAV attribute option value repository to use |
||
134 | * @param \TechDivision\Import\Repositories\EavAttributeRepositoryInterface $eavAttributeRepository The EAV attribute repository to use |
||
135 | * @param \TechDivision\Import\Product\Repositories\ProductRelationRepositoryInterface $productRelationRepository The product relation repository to use |
||
136 | * @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperLinkRepositoryInterface $productSuperLinkRepository The product super link repository to use |
||
137 | * @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeRepositoryInterface $productSuperAttributeRepository The product super attribute repository to use |
||
138 | * @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeLabelRepositoryInterface $productSuperAttributeLabelRepository The product super attribute label repository to use |
||
139 | * @param \TechDivision\Import\Actions\ActionInterface $productRelationAction The product relation action to use |
||
140 | * @param \TechDivision\Import\Actions\ActionInterface $productSuperLinkAction The product super link action to use |
||
141 | * @param \TechDivision\Import\Actions\ActionInterface $productSuperAttributeAction The product super attribute action to use |
||
142 | * @param \TechDivision\Import\Actions\ActionInterface $productSuperAttributeLabelAction The product super attribute label action to use |
||
143 | * @param \TechDivision\Import\Loaders\LoaderInterface $rawEntityLoader The raw entity loader instance |
||
144 | */ |
||
145 | public function __construct( |
||
172 | |||
173 | /** |
||
174 | * Set's the raw entity loader instance. |
||
175 | * |
||
176 | * @param \TechDivision\Import\Loaders\LoaderInterface $rawEntityLoader The raw entity loader instance to set |
||
177 | * |
||
178 | * @return void |
||
179 | */ |
||
180 | public function setRawEntityLoader(LoaderInterface $rawEntityLoader) |
||
184 | |||
185 | /** |
||
186 | * Return's the raw entity loader instance. |
||
187 | * |
||
188 | * @return \TechDivision\Import\Loaders\LoaderInterface The raw entity loader instance |
||
189 | */ |
||
190 | public function getRawEntityLoader() |
||
194 | |||
195 | /** |
||
196 | * Set's the passed connection. |
||
197 | * |
||
198 | * @param \TechDivision\Import\Connection\ConnectionInterface $connection The connection to set |
||
199 | * |
||
200 | * @return void |
||
201 | */ |
||
202 | public function setConnection(ConnectionInterface $connection) |
||
206 | |||
207 | /** |
||
208 | * Return's the connection. |
||
209 | * |
||
210 | * @return \TechDivision\Import\Connection\ConnectionInterface The connection instance |
||
211 | */ |
||
212 | public function getConnection() |
||
216 | |||
217 | /** |
||
218 | * Turns off autocommit mode. While autocommit mode is turned off, changes made to the database via the PDO |
||
219 | * object instance are not committed until you end the transaction by calling ProductProcessor::commit(). |
||
220 | * Calling ProductProcessor::rollBack() will roll back all changes to the database and return the connection |
||
221 | * to autocommit mode. |
||
222 | * |
||
223 | * @return boolean Returns TRUE on success or FALSE on failure |
||
224 | * @link http://php.net/manual/en/pdo.begintransaction.php |
||
225 | */ |
||
226 | public function beginTransaction() |
||
230 | |||
231 | /** |
||
232 | * Commits a transaction, returning the database connection to autocommit mode until the next call to |
||
233 | * ProductProcessor::beginTransaction() starts a new transaction. |
||
234 | * |
||
235 | * @return boolean Returns TRUE on success or FALSE on failure |
||
236 | * @link http://php.net/manual/en/pdo.commit.php |
||
237 | */ |
||
238 | public function commit() |
||
242 | |||
243 | /** |
||
244 | * Rolls back the current transaction, as initiated by ProductProcessor::beginTransaction(). |
||
245 | * |
||
246 | * If the database was set to autocommit mode, this function will restore autocommit mode after it has |
||
247 | * rolled back the transaction. |
||
248 | * |
||
249 | * Some databases, including MySQL, automatically issue an implicit COMMIT when a database definition |
||
250 | * language (DDL) statement such as DROP TABLE or CREATE TABLE is issued within a transaction. The implicit |
||
251 | * COMMIT will prevent you from rolling back any other changes within the transaction boundary. |
||
252 | * |
||
253 | * @return boolean Returns TRUE on success or FALSE on failure |
||
254 | * @link http://php.net/manual/en/pdo.rollback.php |
||
255 | */ |
||
256 | public function rollBack() |
||
260 | |||
261 | /** |
||
262 | * Set's the repository to access EAV attributes. |
||
263 | * |
||
264 | * @param \TechDivision\Import\Repositories\EavAttributeRepositoryInterface $eavAttributeRepository The repository to access EAV attributes |
||
265 | * |
||
266 | * @return void |
||
267 | */ |
||
268 | public function setEavAttributeRepository(EavAttributeRepositoryInterface $eavAttributeRepository) |
||
272 | |||
273 | /** |
||
274 | * Return's the repository to access EAV attributes. |
||
275 | * |
||
276 | * @return \TechDivision\Import\Repositories\EavAttributeRepositoryInterface The repository instance |
||
277 | */ |
||
278 | public function getEavAttributeRepository() |
||
282 | |||
283 | /** |
||
284 | * Set's the repository to access product relations. |
||
285 | * |
||
286 | * @param \TechDivision\Import\Product\Repositories\ProductRelationRepositoryInterface $productRelationRepository The repository instance |
||
287 | * |
||
288 | * @return void |
||
289 | */ |
||
290 | public function setProductRelationRepository(ProductRelationRepositoryInterface $productRelationRepository) |
||
294 | |||
295 | /** |
||
296 | * Return's the repository to access product relations. |
||
297 | * |
||
298 | * @return \TechDivision\Import\Product\Repositories\ProductRelationRepositoryInterface The repository instance |
||
299 | */ |
||
300 | public function getProductRelationRepository() |
||
304 | |||
305 | /** |
||
306 | * Set's the repository to access product super links. |
||
307 | * |
||
308 | * @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperLinkRepositoryInterface $productSuperLinkRepository The repository instance |
||
309 | * |
||
310 | * @return void |
||
311 | */ |
||
312 | public function setProductSuperLinkRepository(ProductSuperLinkRepositoryInterface $productSuperLinkRepository) |
||
316 | |||
317 | /** |
||
318 | * Return's the repository to access product super links. |
||
319 | * |
||
320 | * @return \TechDivision\Import\Product\Variant\Repositories\ProductSuperLinkRepositoryInterface The repository instance |
||
321 | */ |
||
322 | public function getProductSuperLinkRepository() |
||
326 | |||
327 | /** |
||
328 | * Set's the repository to access product super attributes. |
||
329 | * |
||
330 | * @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeRepositoryInterface $productSuperAttributeRepository The repository instance |
||
331 | * |
||
332 | * @return void |
||
333 | */ |
||
334 | public function setProductSuperAttributeRepository(ProductSuperAttributeRepositoryInterface $productSuperAttributeRepository) |
||
338 | |||
339 | /** |
||
340 | * Return's the repository to access product super attributes. |
||
341 | * |
||
342 | * @return \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeRepositoryInterface The repository instance |
||
343 | */ |
||
344 | public function getProductSuperAttributeRepository() |
||
348 | |||
349 | /** |
||
350 | * Set's the repository to access product super attribute labels. |
||
351 | * |
||
352 | * @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeLabelRepositoryInterface $productSuperAttributeLabelRepository The repository instance |
||
353 | * |
||
354 | * @return void |
||
355 | */ |
||
356 | public function setProductSuperAttributeLabelRepository(ProductSuperAttributeLabelRepositoryInterface $productSuperAttributeLabelRepository) |
||
360 | |||
361 | /** |
||
362 | * Return's the repository to access product super attribute labels. |
||
363 | * |
||
364 | * @return \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeLabelRepositoryInterface The repository instance |
||
365 | */ |
||
366 | public function getProductSuperAttributeLabelRepository() |
||
370 | |||
371 | /** |
||
372 | * Set's the repository to access EAV attribute option values. |
||
373 | * |
||
374 | * @param \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository The repository to access EAV attribute option values |
||
375 | * |
||
376 | * @return void |
||
377 | */ |
||
378 | public function setEavAttributeOptionValueRepository(EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository) |
||
382 | |||
383 | /** |
||
384 | * Return's the repository to access EAV attribute option values. |
||
385 | * |
||
386 | * @return \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface The repository instance |
||
387 | */ |
||
388 | public function getEavAttributeOptionValueRepository() |
||
392 | |||
393 | /** |
||
394 | * Set's the action with the product relation CRUD methods. |
||
395 | * |
||
396 | * @param \TechDivision\Import\Actions\ActionInterface $productRelationAction The action with the product relation CRUD methods |
||
397 | * |
||
398 | * @return void |
||
399 | */ |
||
400 | public function setProductRelationAction(ActionInterface $productRelationAction) |
||
404 | |||
405 | /** |
||
406 | * Return's the action with the product relation CRUD methods. |
||
407 | * |
||
408 | * @return \TechDivision\Import\Actions\ActionInterface The action instance |
||
409 | */ |
||
410 | public function getProductRelationAction() |
||
414 | |||
415 | /** |
||
416 | * Set's the action with the product super attribute CRUD methods. |
||
417 | * |
||
418 | * @param \TechDivision\Import\Actions\ActionInterface $productSuperAttributeAction The action with the product super attribute CRUD methods |
||
419 | * |
||
420 | * @return void |
||
421 | */ |
||
422 | public function setProductSuperAttributeAction(ActionInterface $productSuperAttributeAction) |
||
426 | |||
427 | /** |
||
428 | * Return's the action with the product super attribute CRUD methods. |
||
429 | * |
||
430 | * @return \TechDivision\Import\Actions\ActionInterface The action instance |
||
431 | */ |
||
432 | public function getProductSuperAttributeAction() |
||
436 | |||
437 | /** |
||
438 | * Set's the action with the product super attribute label CRUD methods. |
||
439 | * |
||
440 | * @param \TechDivision\Import\Actions\ActionInterface $productSuperAttributeLabelAction The action with the product super attribute label CRUD methods |
||
441 | * |
||
442 | * @return void |
||
443 | */ |
||
444 | public function setProductSuperAttributeLabelAction(ActionInterface $productSuperAttributeLabelAction) |
||
448 | |||
449 | /** |
||
450 | * Return's the action with the product super attribute label CRUD methods. |
||
451 | * |
||
452 | * @return \TechDivision\Import\Actions\ActionInterface The action instance |
||
453 | */ |
||
454 | public function getProductSuperAttributeLabelAction() |
||
458 | |||
459 | /** |
||
460 | * Set's the action with the product super link CRUD methods. |
||
461 | * |
||
462 | * @param \TechDivision\Import\Actions\ActionInterface $productSuperLinkAction The action with the product super link CRUD methods |
||
463 | * |
||
464 | * @return void |
||
465 | */ |
||
466 | public function setProductSuperLinkAction(ActionInterface $productSuperLinkAction) |
||
470 | |||
471 | /** |
||
472 | * Return's the action with the product super link CRUD methods. |
||
473 | * |
||
474 | * @return \TechDivision\Import\Actions\ActionInterface The action instance |
||
475 | */ |
||
476 | public function getProductSuperLinkAction() |
||
480 | |||
481 | /** |
||
482 | * Return's the attribute option value with the passed value and store ID. |
||
483 | * |
||
484 | * @param mixed $value The option value |
||
485 | * @param integer $storeId The ID of the store |
||
486 | * |
||
487 | * @return array|boolean The attribute option value instance |
||
488 | */ |
||
489 | public function getEavAttributeOptionValueByOptionValueAndStoreId($value, $storeId) |
||
493 | |||
494 | /** |
||
495 | * Load's and return's a raw entity without primary key but the mandatory members only and nulled values. |
||
496 | * |
||
497 | * @param string $entityTypeCode The entity type code to return the raw entity for |
||
498 | * @param array $data An array with data that will be used to initialize the raw entity with |
||
499 | * |
||
500 | * @return array The initialized entity |
||
501 | */ |
||
502 | public function loadRawEntity($entityTypeCode, array $data = array()) |
||
506 | |||
507 | /** |
||
508 | * Load's the product relation with the passed parent/child ID. |
||
509 | * |
||
510 | * @param integer $parentId The entity ID of the product relation's parent product |
||
511 | * @param integer $childId The entity ID of the product relation's child product |
||
512 | * |
||
513 | * @return array The product relation |
||
514 | */ |
||
515 | public function loadProductRelation($parentId, $childId) |
||
519 | |||
520 | /** |
||
521 | * Load's the product super link with the passed product/parent ID. |
||
522 | * |
||
523 | * @param integer $productId The entity ID of the product super link's product |
||
524 | * @param integer $parentId The entity ID of the product super link's parent product |
||
525 | * |
||
526 | * @return array The product super link |
||
527 | */ |
||
528 | public function loadProductSuperLink($productId, $parentId) |
||
532 | |||
533 | /** |
||
534 | * Load's the product super attribute with the passed product/attribute ID. |
||
535 | * |
||
536 | * @param integer $productId The entity ID of the product super attribute's product |
||
537 | * @param integer $attributeId The attribute ID of the product super attributes attribute |
||
538 | * |
||
539 | * @return array The product super attribute |
||
540 | */ |
||
541 | public function loadProductSuperAttribute($productId, $attributeId) |
||
545 | |||
546 | /** |
||
547 | * Load's the product super attribute label with the passed product super attribute/store ID. |
||
548 | * |
||
549 | * @param integer $productSuperAttributeId The product super attribute ID of the product super attribute label |
||
550 | * @param integer $storeId The store ID of the product super attribute label |
||
551 | * |
||
552 | * @return array The product super attribute label |
||
553 | */ |
||
554 | public function loadProductSuperAttributeLabel($productSuperAttributeId, $storeId) |
||
558 | |||
559 | /** |
||
560 | * Persist's the passed product relation data and return's the ID. |
||
561 | * |
||
562 | * @param array $productRelation The product relation data to persist |
||
563 | * @param string|null $name The name of the prepared statement that has to be executed |
||
564 | * |
||
565 | * @return void |
||
566 | */ |
||
567 | public function persistProductRelation($productRelation, $name = null) |
||
571 | |||
572 | /** |
||
573 | * Persist's the passed product super link data and return's the ID. |
||
574 | * |
||
575 | * @param array $productSuperLink The product super link data to persist |
||
576 | * @param string|null $name The name of the prepared statement that has to be executed |
||
577 | * |
||
578 | * @return void |
||
579 | */ |
||
580 | public function persistProductSuperLink($productSuperLink, $name = null) |
||
584 | |||
585 | /** |
||
586 | * Persist's the passed product super attribute data and return's the ID. |
||
587 | * |
||
588 | * @param array $productSuperAttribute The product super attribute data to persist |
||
589 | * @param string|null $name The name of the prepared statement that has to be executed |
||
590 | * |
||
591 | * @return string The ID of the persisted product super attribute entity |
||
592 | */ |
||
593 | public function persistProductSuperAttribute($productSuperAttribute, $name = null) |
||
597 | |||
598 | /** |
||
599 | * Persist's the passed product super attribute label data and return's the ID. |
||
600 | * |
||
601 | * @param array $productSuperAttributeLabel The product super attribute label data to persist |
||
602 | * @param string|null $name The name of the prepared statement that has to be executed |
||
603 | * |
||
604 | * @return void |
||
605 | */ |
||
606 | public function persistProductSuperAttributeLabel($productSuperAttributeLabel, $name = null) |
||
610 | } |
||
611 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.