1 | <?php |
||
32 | class ProductLinkProcessor implements ProductLinkProcessorInterface |
||
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 load product links. |
||
44 | * |
||
45 | * @var \TechDivision\Import\Product\Link\Repositories\\ProductLinkRepository |
||
46 | */ |
||
47 | protected $productLinkRepository; |
||
48 | |||
49 | /** |
||
50 | * The repository to load product link attribute integer attributes. |
||
51 | * |
||
52 | * @var \TechDivision\Import\Product\Link\Repositories\\ProductLinkAttributeIntRepository |
||
53 | */ |
||
54 | protected $productLinkAttributeIntRepository; |
||
55 | |||
56 | /** |
||
57 | * The action with the product link CRUD methods. |
||
58 | * |
||
59 | * @var \TechDivision\Import\Product\Link\Actions\ProductLinkAction |
||
60 | */ |
||
61 | protected $productLinkAction; |
||
62 | |||
63 | /** |
||
64 | * The action with the product link attribute CRUD methods. |
||
65 | * |
||
66 | * @var \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeAction |
||
67 | */ |
||
68 | protected $productLinkAttributeAction; |
||
69 | |||
70 | /** |
||
71 | * The action with the product link attribute decimal CRUD methods. |
||
72 | * |
||
73 | * @var \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeDecimalAction |
||
74 | */ |
||
75 | protected $productLinkAttributeDecimalAction; |
||
76 | |||
77 | /** |
||
78 | * The action with the product link attribute integer CRUD methods. |
||
79 | * |
||
80 | * @var \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeIntAction |
||
81 | */ |
||
82 | protected $productLinkAttributeIntAction; |
||
83 | |||
84 | /** |
||
85 | * The action with the product link attribute varchar CRUD methods. |
||
86 | * |
||
87 | * @var \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeVarcharAction |
||
88 | */ |
||
89 | protected $productLinkAttributeVarcharAction; |
||
90 | |||
91 | /** |
||
92 | * Set's the passed connection. |
||
93 | * |
||
94 | * @param \PDO $connection The connection to set |
||
95 | * |
||
96 | * @return void |
||
97 | */ |
||
98 | public function setConnection(\PDO $connection) |
||
102 | |||
103 | /** |
||
104 | * Return's the connection. |
||
105 | * |
||
106 | * @return \PDO The connection instance |
||
107 | */ |
||
108 | public function getConnection() |
||
112 | |||
113 | /** |
||
114 | * Turns off autocommit mode. While autocommit mode is turned off, changes made to the database via the PDO |
||
115 | * object instance are not committed until you end the transaction by calling ProductProcessor::commit(). |
||
116 | * Calling ProductProcessor::rollBack() will roll back all changes to the database and return the connection |
||
117 | * to autocommit mode. |
||
118 | * |
||
119 | * @return boolean Returns TRUE on success or FALSE on failure |
||
120 | * @link http://php.net/manual/en/pdo.begintransaction.php |
||
121 | */ |
||
122 | public function beginTransaction() |
||
126 | |||
127 | /** |
||
128 | * Commits a transaction, returning the database connection to autocommit mode until the next call to |
||
129 | * ProductProcessor::beginTransaction() starts a new transaction. |
||
130 | * |
||
131 | * @return boolean Returns TRUE on success or FALSE on failure |
||
132 | * @link http://php.net/manual/en/pdo.commit.php |
||
133 | */ |
||
134 | public function commit() |
||
138 | |||
139 | /** |
||
140 | * Rolls back the current transaction, as initiated by ProductProcessor::beginTransaction(). |
||
141 | * |
||
142 | * If the database was set to autocommit mode, this function will restore autocommit mode after it has |
||
143 | * rolled back the transaction. |
||
144 | * |
||
145 | * Some databases, including MySQL, automatically issue an implicit COMMIT when a database definition |
||
146 | * language (DDL) statement such as DROP TABLE or CREATE TABLE is issued within a transaction. The implicit |
||
147 | * COMMIT will prevent you from rolling back any other changes within the transaction boundary. |
||
148 | * |
||
149 | * @return boolean Returns TRUE on success or FALSE on failure |
||
150 | * @link http://php.net/manual/en/pdo.rollback.php |
||
151 | */ |
||
152 | public function rollBack() |
||
156 | |||
157 | /** |
||
158 | * Set's the repository to load product links. |
||
159 | * |
||
160 | * @param \TechDivision\Import\Product\Link\Repositories\ProductLinkRepository $productLinkRepository The repository instance |
||
161 | * |
||
162 | * @return void |
||
163 | */ |
||
164 | public function setProductLinkRepository($productLinkRepository) |
||
168 | |||
169 | /** |
||
170 | * Return's the repository to load product links. |
||
171 | * |
||
172 | * @return \TechDivision\Import\Product\Link\Repositories\ProductLinkRepository The repository instance |
||
173 | */ |
||
174 | public function getProductLinkRepository() |
||
178 | |||
179 | /** |
||
180 | * Set's the repository to load product link attribute integer attributes. |
||
181 | * |
||
182 | * @param \TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeIntRepository $productLinkAttributeIntRepository The repository instance |
||
183 | * |
||
184 | * @return void |
||
185 | */ |
||
186 | public function setProductLinkAttributeIntRepository($productLinkAttributeIntRepository) |
||
190 | |||
191 | /** |
||
192 | * Return's the repository to load product link attribute integer attributes. |
||
193 | * |
||
194 | * @return \TechDivision\Import\Product\Link\Repositories\ProductLinkAttributeIntRepository The repository instance |
||
195 | */ |
||
196 | public function getProductLinkAttributeIntRepository() |
||
200 | |||
201 | /** |
||
202 | * Set's the action with the product link CRUD methods. |
||
203 | * |
||
204 | * @param \TechDivision\Import\Product\Link\Actions\ProductLinkAction $productLinkAction The action with the product link CRUD methods |
||
205 | * |
||
206 | * @return void |
||
207 | */ |
||
208 | public function setProductLinkAction($productLinkAction) |
||
212 | |||
213 | /** |
||
214 | * Return's the action with the product link CRUD methods. |
||
215 | * |
||
216 | * @return \TechDivision\Import\Product\Link\Actions\ProductLinkGalleryAction The action with the product link CRUD methods |
||
217 | */ |
||
218 | public function getProductLinkAction() |
||
222 | |||
223 | /** |
||
224 | * Set's the action with the product link attribute CRUD methods. |
||
225 | * |
||
226 | * @param \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeAction $productLinkAttributeAction The action with the product link attribute CRUD methods |
||
227 | * |
||
228 | * @return void |
||
229 | */ |
||
230 | public function setProductLinkAttributeAction($productLinkAttributeAction) |
||
234 | |||
235 | /** |
||
236 | * Return's the action with the product link attribute CRUD methods. |
||
237 | * |
||
238 | * @return \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeAction The action with the product link attribute CRUD methods |
||
239 | */ |
||
240 | public function getProductLinkAttributeAction() |
||
244 | |||
245 | /** |
||
246 | * Set's the action with the product link attribute decimal CRUD methods. |
||
247 | * |
||
248 | * @param \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeDecimalAction $productLinkAttributeDecimalAction The action with the product link attribute decimal CRUD methods |
||
249 | * |
||
250 | * @return void |
||
251 | */ |
||
252 | public function setProductLinkAttributeDecimalAction($productLinkAttributeDecimalAction) |
||
256 | |||
257 | /** |
||
258 | * Return's the action with the product link attribute decimal CRUD methods. |
||
259 | * |
||
260 | * @return \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeDecimalAction The action with the product link attribute decimal CRUD methods |
||
261 | */ |
||
262 | public function getProductLinkAttributeDecimalAction() |
||
266 | |||
267 | /** |
||
268 | * Set's the action with the product link attribute integer CRUD methods. |
||
269 | * |
||
270 | * @param \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeIntAction $productLinkAttributeIntAction The action with the product link attribute integer CRUD methods |
||
271 | * |
||
272 | * @return void |
||
273 | */ |
||
274 | public function setProductLinkAttributeIntAction($productLinkAttributeIntAction) |
||
278 | |||
279 | /** |
||
280 | * Return's the action with the product link attribute integer CRUD methods. |
||
281 | * |
||
282 | * @return \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeIntAction The action with the product link attribute integer CRUD methods |
||
283 | */ |
||
284 | public function getProductLinkAttributeIntAction() |
||
288 | |||
289 | /** |
||
290 | * Set's the action with the product link attribute varchar CRUD methods. |
||
291 | * |
||
292 | * @param \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeVarcharAction $productLinkAttributeVarcharAction The action with the product link attribute varchar CRUD methods |
||
293 | * |
||
294 | * @return void |
||
295 | */ |
||
296 | public function setProductLinkAttributeVarcharAction($productLinkAttributeVarcharAction) |
||
300 | |||
301 | /** |
||
302 | * Return's the action with the product link attribute varchar CRUD methods. |
||
303 | * |
||
304 | * @return \TechDivision\Import\Product\Link\Actions\ProductLinkAttributeVarcharAction The action with the product link attribute varchar CRUD methods |
||
305 | */ |
||
306 | public function getProductLinkAttributeVarcharAction() |
||
310 | |||
311 | /** |
||
312 | * Load's the link with the passed product/linked product/link type ID. |
||
313 | * |
||
314 | * @param integer $productId The product ID of the link to load |
||
315 | * @param integer $linkedProductId The linked product ID of the link to load |
||
316 | * @param integer $linkTypeId The link type ID of the product to load |
||
317 | * |
||
318 | * @return array The link |
||
319 | */ |
||
320 | public function loadProductLink($productId, $linkedProductId, $linkTypeId) |
||
324 | |||
325 | /** |
||
326 | * Return's the product link attribute integer value with the passed product link attribute/link ID. |
||
327 | * |
||
328 | * @param integer $productLinkAttributeId The product link attribute ID of the attributes |
||
329 | * @param integer $linkId The link ID of the attribute |
||
330 | * |
||
331 | * @return array The product link attribute integer value |
||
332 | */ |
||
333 | public function loadProductLinkAttributeInt($productLinkAttributeId, $linkId) |
||
337 | |||
338 | /** |
||
339 | * Persist's the passed product link data and return's the ID. |
||
340 | * |
||
341 | * @param array $productLink The product link data to persist |
||
342 | * |
||
343 | * @return string The ID of the persisted entity |
||
344 | */ |
||
345 | public function persistProductLink($productLink) |
||
349 | |||
350 | /** |
||
351 | * Persist's the passed product link attribute data and return's the ID. |
||
352 | * |
||
353 | * @param array $productLinkAttribute The product link attribute data to persist |
||
354 | * |
||
355 | * @return string The ID of the persisted entity |
||
356 | */ |
||
357 | public function persistProductLinkAttribute($productLinkAttribute) |
||
361 | |||
362 | /** |
||
363 | * Persist's the passed product link attribute decimal data. |
||
364 | * |
||
365 | * @param array $productLinkAttributeDecimal The product link attribute decimal data to persist |
||
366 | * |
||
367 | * @return void |
||
368 | */ |
||
369 | public function persistProductLinkAttributeDecimal($productLinkAttributeDecimal) |
||
373 | |||
374 | /** |
||
375 | * Persist's the passed product link attribute integer data. |
||
376 | * |
||
377 | * @param array $productLinkAttributeInt The product link attribute integer data to persist |
||
378 | * |
||
379 | * @return string The ID of the persisted entity |
||
380 | */ |
||
381 | public function persistProductLinkAttributeInt($productLinkAttributeInt) |
||
385 | |||
386 | /** |
||
387 | * Persist's the passed product link attribute varchar data. |
||
388 | * |
||
389 | * @param array $productLinkAttributeVarchar The product link attribute varchar data to persist |
||
390 | * |
||
391 | * @return string The ID of the persisted entity |
||
392 | */ |
||
393 | public function persistProductLinkAttributeVarchar($productLinkAttributeVarchar) |
||
397 | } |
||
398 |
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..