1 | <?php |
||
32 | class ProductBundleProcessor implements ProductBundleProcessorInterface |
||
33 | { |
||
34 | |||
35 | /** |
||
36 | * A PDO connection initialized with the values from the Doctrine EntityManager. |
||
37 | * |
||
38 | * @var \PDO |
||
39 | */ |
||
40 | protected $connection; |
||
41 | |||
42 | /** |
||
43 | * The repository to access EAV attribute option values. |
||
44 | * |
||
45 | * @var \TechDivision\Import\Repositories\EavAttributeOptionValueRepository |
||
46 | */ |
||
47 | protected $eavAttributeOptionValueRepository; |
||
48 | |||
49 | /** |
||
50 | * The action for product bundle option CRUD methods. |
||
51 | * |
||
52 | * @var \TechDivision\Import\Product\Bundle\Actions\ProductBundleOptionAction |
||
53 | */ |
||
54 | protected $productBundleOptionAction; |
||
55 | |||
56 | /** |
||
57 | * The action for product bundle option value CRUD methods. |
||
58 | * |
||
59 | * @var \TechDivision\Import\Product\Bundle\Actions\ProductBundleOptionValueAction |
||
60 | */ |
||
61 | protected $productBundleOptionValueAction; |
||
62 | |||
63 | /** |
||
64 | * The action for product bundle selection CRUD methods. |
||
65 | * |
||
66 | * @var \TechDivision\Import\Product\Bundle\Actions\ProductBundleSelectionAction |
||
67 | */ |
||
68 | protected $productBundleSelectionAction; |
||
69 | |||
70 | /** |
||
71 | * The action for product bundle selection price CRUD methods. |
||
72 | * |
||
73 | * @var \TechDivision\Import\Product\Bundle\Actions\ProductBundleSelectionPriceAction |
||
74 | */ |
||
75 | protected $productBundleSelectionPriceAction; |
||
76 | |||
77 | /** |
||
78 | * The repository to load bundle option data. |
||
79 | * |
||
80 | * @var \TechDivision\Import\Product\Bundle\Respository\BundleOptionRepository |
||
81 | */ |
||
82 | protected $bundleOptionRespository; |
||
83 | |||
84 | /** |
||
85 | * The repository to load bundle option value data. |
||
86 | * |
||
87 | * @var \TechDivision\Import\Product\Bundle\Respository\BundleOptionValueRepository |
||
88 | */ |
||
89 | protected $bundleOptionValueRespository; |
||
90 | |||
91 | /** |
||
92 | * The repository to load bundle selection data. |
||
93 | * |
||
94 | * @var \TechDivision\Import\Product\Bundle\Respository\BundleSelectionRepository |
||
95 | */ |
||
96 | protected $bundleSelectionRespository; |
||
97 | |||
98 | /** |
||
99 | * The repository to load bundle selection price data. |
||
100 | * |
||
101 | * @var \TechDivision\Import\Product\Bundle\Respository\BundleSelectionPriceRepository |
||
102 | */ |
||
103 | protected $bundleSelectionPriceRespository; |
||
104 | |||
105 | /** |
||
106 | * Set's the passed connection. |
||
107 | * |
||
108 | * @param \PDO $connection The connection to set |
||
109 | * |
||
110 | * @return void |
||
111 | */ |
||
112 | public function setConnection(\PDO $connection) |
||
116 | |||
117 | /** |
||
118 | * Return's the connection. |
||
119 | * |
||
120 | * @return \PDO The connection instance |
||
121 | */ |
||
122 | public function getConnection() |
||
126 | |||
127 | /** |
||
128 | * Turns off autocommit mode. While autocommit mode is turned off, changes made to the database via the PDO |
||
129 | * object instance are not committed until you end the transaction by calling ProductProcessor::commit(). |
||
130 | * Calling ProductProcessor::rollBack() will roll back all changes to the database and return the connection |
||
131 | * to autocommit mode. |
||
132 | * |
||
133 | * @return boolean Returns TRUE on success or FALSE on failure |
||
134 | * @link http://php.net/manual/en/pdo.begintransaction.php |
||
135 | */ |
||
136 | public function beginTransaction() |
||
140 | |||
141 | /** |
||
142 | * Commits a transaction, returning the database connection to autocommit mode until the next call to |
||
143 | * ProductProcessor::beginTransaction() starts a new transaction. |
||
144 | * |
||
145 | * @return boolean Returns TRUE on success or FALSE on failure |
||
146 | * @link http://php.net/manual/en/pdo.commit.php |
||
147 | */ |
||
148 | public function commit() |
||
152 | |||
153 | /** |
||
154 | * Rolls back the current transaction, as initiated by ProductProcessor::beginTransaction(). |
||
155 | * |
||
156 | * If the database was set to autocommit mode, this function will restore autocommit mode after it has |
||
157 | * rolled back the transaction. |
||
158 | * |
||
159 | * Some databases, including MySQL, automatically issue an implicit COMMIT when a database definition |
||
160 | * language (DDL) statement such as DROP TABLE or CREATE TABLE is issued within a transaction. The implicit |
||
161 | * COMMIT will prevent you from rolling back any other changes within the transaction boundary. |
||
162 | * |
||
163 | * @return boolean Returns TRUE on success or FALSE on failure |
||
164 | * @link http://php.net/manual/en/pdo.rollback.php |
||
165 | */ |
||
166 | public function rollBack() |
||
170 | |||
171 | /** |
||
172 | * Set's the repository to access EAV attribute option values. |
||
173 | * |
||
174 | * @param \TechDivision\Import\Repositories\EavAttributeOptionValueRepository $eavAttributeOptionValueRepository The repository to access EAV attribute option values |
||
175 | * |
||
176 | * @return void |
||
177 | */ |
||
178 | public function setEavAttributeOptionValueRepository($eavAttributeOptionValueRepository) |
||
182 | |||
183 | /** |
||
184 | * Return's the repository to access EAV attribute option values. |
||
185 | * |
||
186 | * @return \TechDivision\Import\Repositories\EavAttributeOptionValueRepository The repository instance |
||
187 | */ |
||
188 | public function getEavAttributeOptionValueRepository() |
||
192 | |||
193 | /** |
||
194 | * Set's the action with the product bundle option CRUD methods. |
||
195 | * |
||
196 | * @param \TechDivision\Import\Product\Bundle\Actions\ProductBundleOptionAction $productBundleOptionAction The action with the product bundle option CRUD methods |
||
197 | * |
||
198 | * @return void |
||
199 | */ |
||
200 | public function setProductBundleOptionAction($productBundleOptionAction) |
||
204 | |||
205 | /** |
||
206 | * Return's the action with the product bundle option CRUD methods. |
||
207 | * |
||
208 | * @return \TechDivision\Import\Product\Bundle\Actions\ProductBundleOptionAction The action instance |
||
209 | */ |
||
210 | public function getProductBundleOptionAction() |
||
214 | |||
215 | /** |
||
216 | * Set's the action with the product bundle option value CRUD methods. |
||
217 | * |
||
218 | * @param \TechDivision\Import\Product\Bundle\Actions\ProductBundleOptionValueAction $productBundleOptionValueAction The action with the product bundle option value CRUD methods |
||
219 | * |
||
220 | * @return void |
||
221 | */ |
||
222 | public function setProductBundleOptionValueAction($productBundleOptionValueAction) |
||
226 | |||
227 | /** |
||
228 | * Return's the action with the product bundle option value CRUD methods. |
||
229 | * |
||
230 | * @return \TechDivision\Import\Product\Bundle\Actions\ProductBundleOptionValueAction The action instance |
||
231 | */ |
||
232 | public function getProductBundleOptionValueAction() |
||
236 | |||
237 | /** |
||
238 | * Set's the action with the product bundle selection CRUD methods. |
||
239 | * |
||
240 | * @param \TechDivision\Import\Product\Bundle\Actions\ProductBundleSelectionAction $productBundleSelectionAction The action with the product bundle selection CRUD methods |
||
241 | * |
||
242 | * @return void |
||
243 | */ |
||
244 | public function setProductBundleSelectionAction($productBundleSelectionAction) |
||
248 | |||
249 | /** |
||
250 | * Return's the action with the product bundle selection CRUD methods. |
||
251 | * |
||
252 | * @return \TechDivision\Import\Product\Bundle\Actions\ProductBundleSelectionAction The action instance |
||
253 | */ |
||
254 | public function getProductBundleSelectionAction() |
||
258 | |||
259 | /** |
||
260 | * Set's the action with the product bundle selection price CRUD methods. |
||
261 | * |
||
262 | * @param \TechDivision\Import\Product\Bundle\Actions\ProductBundleSelectionPriceAction $productBundleSelectionPriceAction The action with the product bundle selection price CRUD methods |
||
263 | * |
||
264 | * @return void |
||
265 | */ |
||
266 | public function setProductBundleSelectionPriceAction($productBundleSelectionPriceAction) |
||
270 | |||
271 | /** |
||
272 | * Return's the action with the product bundle selection price CRUD methods. |
||
273 | * |
||
274 | * @return \TechDivision\Import\Product\Bundle\Actions\ProductBundleSelectionPriceAction The action instance |
||
275 | */ |
||
276 | public function getProductBundleSelectionPriceAction() |
||
280 | |||
281 | /** |
||
282 | * Set's the repository to load bundle option data. |
||
283 | * |
||
284 | * @param \TechDivision\Import\Product\Bundle\Repository\BundleOptionRespository $bundleOptionRespository The repository instance |
||
285 | * |
||
286 | * @return void |
||
287 | */ |
||
288 | public function setBundleOptionRepository($bundleOptionRespository) |
||
292 | |||
293 | /** |
||
294 | * Return's the respository to load bundle option data. |
||
295 | * |
||
296 | * @return \TechDivision\Import\Product\Bundle\Repository\BundleOptionRespository The repository instance |
||
297 | */ |
||
298 | public function getBundleOptionRepository() |
||
302 | |||
303 | /** |
||
304 | * Set's the repository to load bundle option value data. |
||
305 | * |
||
306 | * @param \TechDivision\Import\Product\Bundle\Repository\BundleOptionValueRespository $bundleOptionValueRespository The repository instance |
||
307 | * |
||
308 | * @return void |
||
309 | */ |
||
310 | public function setBundleOptionValueRepository($bundleOptionValueRespository) |
||
314 | |||
315 | /** |
||
316 | * Return's the respository to load bundle option value data. |
||
317 | * |
||
318 | * @return \TechDivision\Import\Product\Bundle\Repository\BundleOptionValueRespository The repository instance |
||
319 | */ |
||
320 | public function getBundleOptionValueRepository() |
||
324 | |||
325 | /** |
||
326 | * Set's the repository to load bundle selection data. |
||
327 | * |
||
328 | * @param \TechDivision\Import\Product\Bundle\Repository\BundleSelectionRespository $bundleSelectionRespository The repository instance |
||
329 | * |
||
330 | * @return void |
||
331 | */ |
||
332 | public function setBundleSelectionRepository($bundleSelectionRespository) |
||
336 | |||
337 | /** |
||
338 | * Return's the respository to load bundle selection data. |
||
339 | * |
||
340 | * @return \TechDivision\Import\Product\Bundle\Repository\BundleSelectionRespository The repository instance |
||
341 | */ |
||
342 | public function getBundleSelectionRepository() |
||
346 | |||
347 | /** |
||
348 | * Set's the repository to load bundle selection price data. |
||
349 | * |
||
350 | * @param \TechDivision\Import\Product\Bundle\Repository\BundleSelectionPriceRespository $bundleSelectionPriceRespository The repository instance |
||
351 | * |
||
352 | * @return void |
||
353 | */ |
||
354 | public function setBundleSelectionPriceRepository($bundleSelectionPriceRespository) |
||
358 | |||
359 | /** |
||
360 | * Return's the respository to load bundle selection price data. |
||
361 | * |
||
362 | * @return \TechDivision\Import\Product\Bundle\Repository\BundleSelectionPriceRespository The repository instance |
||
363 | */ |
||
364 | public function getBundleSelectionPriceRepository() |
||
368 | |||
369 | /** |
||
370 | * Return's the attribute option value with the passed value and store ID. |
||
371 | * |
||
372 | * @param mixed $value The option value |
||
373 | * @param integer $storeId The ID of the store |
||
374 | * |
||
375 | * @return array|boolean The attribute option value instance |
||
376 | */ |
||
377 | public function getEavAttributeOptionValueByOptionValueAndStoreId($value, $storeId) |
||
381 | |||
382 | /** |
||
383 | * Load's the bundle option with the passed name, store + parent ID. |
||
384 | * |
||
385 | * @param string $title The title of the bundle option to be returned |
||
386 | * @param integer $storeId The store ID of the bundle option to be returned |
||
387 | * @param integer $parentId The entity of the product the bundle option is related with |
||
388 | * |
||
389 | * @return array The bundle option |
||
390 | */ |
||
391 | public function loadBundleOption($title, $storeId, $parentId) |
||
395 | |||
396 | /** |
||
397 | * Load's the bundle option value with the passed name, store + parent ID. |
||
398 | * |
||
399 | * @param string $title The title of the bundle option value to be returned |
||
400 | * @param integer $storeId The store ID of the bundle option value to be returned |
||
401 | * @param integer $parentId The entity of the product the bundle option value is related with |
||
402 | * |
||
403 | * @return array The bundle option |
||
404 | */ |
||
405 | public function loadBundleOptionValue($title, $storeId, $parentId) |
||
409 | |||
410 | /** |
||
411 | * Load's the bundle selection value with the passed option/product/parent product ID. |
||
412 | * |
||
413 | * @param integer $optionId The option ID of the bundle selection to be returned |
||
414 | * @param integer $productId The product ID of the bundle selection to be returned |
||
415 | * @param integer $parentProductId The parent product ID of the bundle selection to be returned |
||
416 | * |
||
417 | * @return array The bundle selection |
||
418 | */ |
||
419 | public function loadBundleSelection($optionId, $productId, $parentProductId) |
||
423 | |||
424 | /** |
||
425 | * Load's the bundle selection price with the passed selection/website ID. |
||
426 | * |
||
427 | * @param integer $selectionId The selection ID of the bundle selection price to be returned |
||
428 | * @param integer $websiteId The website ID of the bundle selection price to be returned |
||
429 | * |
||
430 | * @return array The bundle selection price |
||
431 | */ |
||
432 | public function loadBundleSelectionPrice($selectionId, $websiteId) |
||
436 | |||
437 | /** |
||
438 | * Persist's the passed product bundle option data and return's the ID. |
||
439 | * |
||
440 | * @param array $productBundleOption The product bundle option data to persist |
||
441 | * |
||
442 | * @return string The ID of the persisted entity |
||
443 | */ |
||
444 | public function persistProductBundleOption($productBundleOption) |
||
448 | |||
449 | /** |
||
450 | * Persist's the passed product bundle option value data. |
||
451 | * |
||
452 | * @param array $productBundleOptionValue The product bundle option value data to persist |
||
453 | * |
||
454 | * @return void |
||
455 | */ |
||
456 | public function persistProductBundleOptionValue($productBundleOptionValue) |
||
460 | |||
461 | /** |
||
462 | * Persist's the passed product bundle selection data and return's the ID. |
||
463 | * |
||
464 | * @param array $productBundleSelection The product bundle selection data to persist |
||
465 | * |
||
466 | * @return string The ID of the persisted entity |
||
467 | */ |
||
468 | public function persistProductBundleSelection($productBundleSelection) |
||
472 | |||
473 | /** |
||
474 | * Persist's the passed product bundle selection price data and return's the ID. |
||
475 | * |
||
476 | * @param array $productBundleSelectionPrice The product bundle selection price data to persist |
||
477 | * |
||
478 | * @return void |
||
479 | */ |
||
480 | public function persistProductBundleSelectionPrice($productBundleSelectionPrice) |
||
484 | } |
||
485 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..