1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* TechDivision\Import\Product\Services\ProductBunchProcessor |
5
|
|
|
* |
6
|
|
|
* NOTICE OF LICENSE |
7
|
|
|
* |
8
|
|
|
* This source file is subject to the Open Software License (OSL 3.0) |
9
|
|
|
* that is available through the world-wide-web at this URL: |
10
|
|
|
* http://opensource.org/licenses/osl-3.0.php |
11
|
|
|
* |
12
|
|
|
* PHP version 5 |
13
|
|
|
* |
14
|
|
|
* @author Tim Wagner <[email protected]> |
15
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
16
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
17
|
|
|
* @link https://github.com/techdivision/import-product |
18
|
|
|
* @link http://www.techdivision.com |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace TechDivision\Import\Product\Services; |
22
|
|
|
|
23
|
|
|
use TechDivision\Import\Loaders\LoaderInterface; |
24
|
|
|
use TechDivision\Import\Dbal\Actions\ActionInterface; |
25
|
|
|
use TechDivision\Import\Dbal\Connection\ConnectionInterface; |
26
|
|
|
use TechDivision\Import\Repositories\UrlRewriteRepositoryInterface; |
27
|
|
|
use TechDivision\Import\Repositories\EavAttributeRepositoryInterface; |
28
|
|
|
use TechDivision\Import\Repositories\EavEntityTypeRepositoryInterface; |
29
|
|
|
use TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface; |
30
|
|
|
use TechDivision\Import\Product\Repositories\ProductRepositoryInterface; |
31
|
|
|
use TechDivision\Import\Product\Repositories\StockItemRepositoryInterface; |
32
|
|
|
use TechDivision\Import\Product\Repositories\ProductIntRepositoryInterface; |
33
|
|
|
use TechDivision\Import\Product\Repositories\ProductTextRepositoryInterface; |
34
|
|
|
use TechDivision\Import\Product\Assemblers\ProductAttributeAssemblerInterface; |
35
|
|
|
use TechDivision\Import\Product\Repositories\ProductDecimalRepositoryInterface; |
36
|
|
|
use TechDivision\Import\Product\Repositories\ProductWebsiteRepositoryInterface; |
37
|
|
|
use TechDivision\Import\Product\Repositories\ProductDatetimeRepositoryInterface; |
38
|
|
|
use TechDivision\Import\Product\Repositories\ProductVarcharRepositoryInterface; |
39
|
|
|
use TechDivision\Import\Product\Repositories\CategoryProductRepositoryInterface; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* The product bunch processor implementation. |
43
|
|
|
* |
44
|
|
|
* @author Tim Wagner <[email protected]> |
45
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
46
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
47
|
|
|
* @link https://github.com/techdivision/import-product |
48
|
|
|
* @link http://www.techdivision.com |
49
|
|
|
*/ |
50
|
|
|
class ProductBunchProcessor implements ProductBunchProcessorInterface |
51
|
|
|
{ |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* A PDO connection initialized with the values from the Doctrine EntityManager. |
55
|
|
|
* |
56
|
|
|
* @var \TechDivision\Import\Dbal\Connection\ConnectionInterface |
57
|
|
|
*/ |
58
|
|
|
protected $connection; |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* The repository to access EAV attribute option values. |
62
|
|
|
* |
63
|
|
|
* @var \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface |
64
|
|
|
*/ |
65
|
|
|
protected $eavAttributeOptionValueRepository; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* The repository to access EAV attributes. |
69
|
|
|
* |
70
|
|
|
* @var \TechDivision\Import\Repositories\EavAttributeRepositoryInterface |
71
|
|
|
*/ |
72
|
|
|
protected $eavAttributeRepository; |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* The action for product CRUD methods. |
76
|
|
|
* |
77
|
|
|
* @var \TechDivision\Import\Dbal\Actions\ActionInterface |
78
|
|
|
*/ |
79
|
|
|
protected $productAction; |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* The action for product varchar attribute CRUD methods. |
83
|
|
|
* |
84
|
|
|
* @var \TechDivision\Import\Dbal\Actions\ActionInterface |
85
|
|
|
*/ |
86
|
|
|
protected $productVarcharAction; |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* The action for product text attribute CRUD methods. |
90
|
|
|
* |
91
|
|
|
* @var \TechDivision\Import\Dbal\Actions\ActionInterface |
92
|
|
|
*/ |
93
|
|
|
protected $productTextAction; |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* The action for product int attribute CRUD methods. |
97
|
|
|
* |
98
|
|
|
* @var \TechDivision\Import\Dbal\Actions\ActionInterface |
99
|
|
|
*/ |
100
|
|
|
protected $productIntAction; |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* The action for product decimal attribute CRUD methods. |
104
|
|
|
* |
105
|
|
|
* @var \TechDivision\Import\Dbal\Actions\ActionInterface |
106
|
|
|
*/ |
107
|
|
|
protected $productDecimalAction; |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* The action for product datetime attribute CRUD methods. |
111
|
|
|
* |
112
|
|
|
* @var \TechDivision\Import\Dbal\Actions\ActionInterface |
113
|
|
|
*/ |
114
|
|
|
protected $productDatetimeAction; |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* The action for product website CRUD methods. |
118
|
|
|
* |
119
|
|
|
* @var \TechDivision\Import\Dbal\Actions\ActionInterface |
120
|
|
|
*/ |
121
|
|
|
protected $productWebsiteAction; |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* The action for category product relation CRUD methods. |
125
|
|
|
* |
126
|
|
|
* @var \TechDivision\Import\Dbal\Actions\ActionInterface |
127
|
|
|
*/ |
128
|
|
|
protected $categoryProductAction; |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* The action for stock item CRUD methods. |
132
|
|
|
* |
133
|
|
|
* @var \TechDivision\Import\Dbal\Actions\ActionInterface |
134
|
|
|
*/ |
135
|
|
|
protected $stockItemAction; |
136
|
|
|
|
137
|
|
|
/** |
138
|
|
|
* The action for URL rewrite CRUD methods. |
139
|
|
|
* |
140
|
|
|
* @var \TechDivision\Import\Dbal\Actions\ActionInterface |
141
|
|
|
*/ |
142
|
|
|
protected $urlRewriteAction; |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* The repository to load the products with. |
146
|
|
|
* |
147
|
|
|
* @var \TechDivision\Import\Product\Repositories\ProductRepositoryInterface |
148
|
|
|
*/ |
149
|
|
|
protected $productRepository; |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* The repository to load the product website relations with. |
153
|
|
|
* |
154
|
|
|
* @var \TechDivision\Import\Product\Repositories\ProductWebsiteRepositoryInterface |
155
|
|
|
*/ |
156
|
|
|
protected $productWebsiteRepository; |
157
|
|
|
|
158
|
|
|
/** |
159
|
|
|
* The repository to load the product datetime attribute with. |
160
|
|
|
* |
161
|
|
|
* @var \TechDivision\Import\Product\Repositories\ProductDatetimeRepositoryInterface |
162
|
|
|
*/ |
163
|
|
|
protected $productDatetimeRepository; |
164
|
|
|
|
165
|
|
|
/** |
166
|
|
|
* The repository to load the product decimal attribute with. |
167
|
|
|
* |
168
|
|
|
* @var \TechDivision\Import\Product\Repositories\ProductDecimalRepositoryInterface |
169
|
|
|
*/ |
170
|
|
|
protected $productDecimalRepository; |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* The repository to load the product integer attribute with. |
174
|
|
|
* |
175
|
|
|
* @var \TechDivision\Import\Product\Repositories\ProductIntRepositoryInterface |
176
|
|
|
*/ |
177
|
|
|
protected $productIntRepository; |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* The repository to load the product text attribute with. |
181
|
|
|
* |
182
|
|
|
* @var \TechDivision\Import\Product\Repositories\ProductTextRepositoryInterface |
183
|
|
|
*/ |
184
|
|
|
protected $productTextRepository; |
185
|
|
|
|
186
|
|
|
/** |
187
|
|
|
* The repository to load the product varchar attribute with. |
188
|
|
|
* |
189
|
|
|
* @var \TechDivision\Import\Product\Repositories\ProductVarcharRepositoryInterface |
190
|
|
|
*/ |
191
|
|
|
protected $productVarcharRepository; |
192
|
|
|
|
193
|
|
|
/** |
194
|
|
|
* The repository to load the category product relations with. |
195
|
|
|
* |
196
|
|
|
* @var \TechDivision\Import\Product\Repositories\CategoryProductRepositoryInterface |
197
|
|
|
*/ |
198
|
|
|
protected $categoryProductRepository; |
199
|
|
|
|
200
|
|
|
/** |
201
|
|
|
* The repository to load the stock item with. |
202
|
|
|
* |
203
|
|
|
* @var \TechDivision\Import\Product\Repositories\StockItemRepositoryInterface |
204
|
|
|
*/ |
205
|
|
|
protected $stockItemRepository; |
206
|
|
|
|
207
|
|
|
/** |
208
|
|
|
* The assembler to load the product attributes with. |
209
|
|
|
* |
210
|
|
|
* @var \TechDivision\Import\Product\Assemblers\ProductAttributeAssemblerInterface |
211
|
|
|
*/ |
212
|
|
|
protected $productAttributeAssembler; |
213
|
|
|
|
214
|
|
|
/** |
215
|
|
|
* The raw entity loader instance. |
216
|
|
|
* |
217
|
|
|
* @var \TechDivision\Import\Loaders\LoaderInterface |
218
|
|
|
*/ |
219
|
|
|
protected $rawEntityLoader; |
220
|
|
|
|
221
|
|
|
/** |
222
|
|
|
* The repository to load the stock item with. |
223
|
|
|
* |
224
|
|
|
* @var \TechDivision\Import\Repositories\UrlRewriteRepositoryInterface |
225
|
|
|
*/ |
226
|
|
|
protected $urlRewriteRepository; |
227
|
|
|
|
228
|
|
|
/** |
229
|
|
|
* Initialize the processor with the necessary assembler and repository instances. |
230
|
|
|
* |
231
|
|
|
* @param \TechDivision\Import\Dbal\Connection\ConnectionInterface $connection The connection to use |
232
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductRepositoryInterface $productRepository The product repository to use |
233
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductWebsiteRepositoryInterface $productWebsiteRepository The product website repository to use |
234
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductDatetimeRepositoryInterface $productDatetimeRepository The product datetime repository to use |
235
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductDecimalRepositoryInterface $productDecimalRepository The product decimal repository to use |
236
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductIntRepositoryInterface $productIntRepository The product integer repository to use |
237
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductTextRepositoryInterface $productTextRepository The product text repository to use |
238
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductVarcharRepositoryInterface $productVarcharRepository The product varchar repository to use |
239
|
|
|
* @param \TechDivision\Import\Product\Repositories\CategoryProductRepositoryInterface $categoryProductRepository The category product repository to use |
240
|
|
|
* @param \TechDivision\Import\Product\Repositories\StockItemRepositoryInterface $stockItemRepository The stock item repository to use |
241
|
|
|
* @param \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository The EAV attribute option value repository to use |
242
|
|
|
* @param \TechDivision\Import\Repositories\EavAttributeRepositoryInterface $eavAttributeRepository The EAV attribute repository to use |
243
|
|
|
* @param \TechDivision\Import\Repositories\EavEntityTypeRepositoryInterface $eavEntityTypeRepository The EAV entity type repository to use |
244
|
|
|
* @param \TechDivision\Import\Dbal\Actions\ActionInterface $categoryProductAction The category product action to use |
245
|
|
|
* @param \TechDivision\Import\Dbal\Actions\ActionInterface $productDatetimeAction The product datetime action to use |
246
|
|
|
* @param \TechDivision\Import\Dbal\Actions\ActionInterface $productDecimalAction The product decimal action to use |
247
|
|
|
* @param \TechDivision\Import\Dbal\Actions\ActionInterface $productIntAction The product integer action to use |
248
|
|
|
* @param \TechDivision\Import\Dbal\Actions\ActionInterface $productAction The product action to use |
249
|
|
|
* @param \TechDivision\Import\Dbal\Actions\ActionInterface $productTextAction The product text action to use |
250
|
|
|
* @param \TechDivision\Import\Dbal\Actions\ActionInterface $productVarcharAction The product varchar action to use |
251
|
|
|
* @param \TechDivision\Import\Dbal\Actions\ActionInterface $productWebsiteAction The product website action to use |
252
|
|
|
* @param \TechDivision\Import\Dbal\Actions\ActionInterface $stockItemAction The stock item action to use |
253
|
|
|
* @param \TechDivision\Import\Dbal\Actions\ActionInterface $urlRewriteAction The URL rewrite action to use |
254
|
|
|
* @param \TechDivision\Import\Product\Assemblers\ProductAttributeAssemblerInterface $productAttributeAssembler The assembler to load the product attributes with |
255
|
|
|
* @param \TechDivision\Import\Loaders\LoaderInterface $rawEntityLoader The raw entity loader instance |
256
|
|
|
* @param \TechDivision\Import\Repositories\UrlRewriteRepositoryInterface $urlRewriteRepository The URL rewrite repository to use |
257
|
|
|
*/ |
258
|
|
|
public function __construct( |
259
|
|
|
ConnectionInterface $connection, |
260
|
|
|
ProductRepositoryInterface $productRepository, |
261
|
|
|
ProductWebsiteRepositoryInterface $productWebsiteRepository, |
262
|
|
|
ProductDatetimeRepositoryInterface $productDatetimeRepository, |
263
|
|
|
ProductDecimalRepositoryInterface $productDecimalRepository, |
264
|
|
|
ProductIntRepositoryInterface $productIntRepository, |
265
|
|
|
ProductTextRepositoryInterface $productTextRepository, |
266
|
|
|
ProductVarcharRepositoryInterface $productVarcharRepository, |
267
|
|
|
CategoryProductRepositoryInterface $categoryProductRepository, |
268
|
|
|
StockItemRepositoryInterface $stockItemRepository, |
269
|
|
|
EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository, |
270
|
|
|
EavAttributeRepositoryInterface $eavAttributeRepository, |
271
|
|
|
EavEntityTypeRepositoryInterface $eavEntityTypeRepository, |
272
|
|
|
ActionInterface $categoryProductAction, |
273
|
|
|
ActionInterface $productDatetimeAction, |
274
|
|
|
ActionInterface $productDecimalAction, |
275
|
|
|
ActionInterface $productIntAction, |
276
|
|
|
ActionInterface $productAction, |
277
|
|
|
ActionInterface $productTextAction, |
278
|
|
|
ActionInterface $productVarcharAction, |
279
|
|
|
ActionInterface $productWebsiteAction, |
280
|
|
|
ActionInterface $stockItemAction, |
281
|
|
|
ActionInterface $urlRewriteAction, |
282
|
|
|
ProductAttributeAssemblerInterface $productAttributeAssembler, |
283
|
|
|
LoaderInterface $rawEntityLoader, |
284
|
|
|
UrlRewriteRepositoryInterface $urlRewriteRepository |
285
|
|
|
) { |
286
|
|
|
$this->setConnection($connection); |
287
|
|
|
$this->setProductRepository($productRepository); |
288
|
|
|
$this->setProductWebsiteRepository($productWebsiteRepository); |
289
|
|
|
$this->setProductDatetimeRepository($productDatetimeRepository); |
290
|
|
|
$this->setProductDecimalRepository($productDecimalRepository); |
291
|
|
|
$this->setProductIntRepository($productIntRepository); |
292
|
|
|
$this->setProductTextRepository($productTextRepository); |
293
|
|
|
$this->setProductVarcharRepository($productVarcharRepository); |
294
|
|
|
$this->setCategoryProductRepository($categoryProductRepository); |
295
|
|
|
$this->setStockItemRepository($stockItemRepository); |
296
|
|
|
$this->setEavAttributeOptionValueRepository($eavAttributeOptionValueRepository); |
297
|
|
|
$this->setEavAttributeRepository($eavAttributeRepository); |
298
|
|
|
$this->setEavEntityTypeRepository($eavEntityTypeRepository); |
299
|
|
|
$this->setCategoryProductAction($categoryProductAction); |
300
|
|
|
$this->setProductDatetimeAction($productDatetimeAction); |
301
|
|
|
$this->setProductDecimalAction($productDecimalAction); |
302
|
|
|
$this->setProductIntAction($productIntAction); |
303
|
|
|
$this->setProductAction($productAction); |
304
|
|
|
$this->setProductTextAction($productTextAction); |
305
|
|
|
$this->setProductVarcharAction($productVarcharAction); |
306
|
|
|
$this->setProductWebsiteAction($productWebsiteAction); |
307
|
|
|
$this->setStockItemAction($stockItemAction); |
308
|
|
|
$this->setUrlRewriteAction($urlRewriteAction); |
309
|
|
|
$this->setProductAttributeAssembler($productAttributeAssembler); |
310
|
|
|
$this->setRawEntityLoader($rawEntityLoader); |
311
|
|
|
$this->setUrlRewriteRepository($urlRewriteRepository); |
312
|
|
|
} |
313
|
|
|
|
314
|
|
|
/** |
315
|
|
|
* Set's the raw entity loader instance. |
316
|
|
|
* |
317
|
|
|
* @param \TechDivision\Import\Loaders\LoaderInterface $rawEntityLoader The raw entity loader instance to set |
318
|
|
|
* |
319
|
|
|
* @return void |
320
|
|
|
*/ |
321
|
|
|
public function setRawEntityLoader(LoaderInterface $rawEntityLoader) |
322
|
|
|
{ |
323
|
|
|
$this->rawEntityLoader = $rawEntityLoader; |
324
|
|
|
} |
325
|
|
|
|
326
|
|
|
/** |
327
|
|
|
* Return's the raw entity loader instance. |
328
|
|
|
* |
329
|
|
|
* @return \TechDivision\Import\Loaders\LoaderInterface The raw entity loader instance |
330
|
|
|
*/ |
331
|
|
|
public function getRawEntityLoader() |
332
|
|
|
{ |
333
|
|
|
return $this->rawEntityLoader; |
334
|
|
|
} |
335
|
|
|
|
336
|
|
|
/** |
337
|
|
|
* Set's the passed connection. |
338
|
|
|
* |
339
|
|
|
* @param \TechDivision\Import\Dbal\Connection\ConnectionInterface $connection The connection to set |
340
|
|
|
* |
341
|
|
|
* @return void |
342
|
|
|
*/ |
343
|
|
|
public function setConnection(ConnectionInterface $connection) |
344
|
|
|
{ |
345
|
|
|
$this->connection = $connection; |
346
|
|
|
} |
347
|
|
|
|
348
|
|
|
/** |
349
|
|
|
* Return's the connection. |
350
|
|
|
* |
351
|
|
|
* @return \TechDivision\Import\Dbal\Connection\ConnectionInterface The connection instance |
352
|
|
|
*/ |
353
|
|
|
public function getConnection() |
354
|
|
|
{ |
355
|
|
|
return $this->connection; |
356
|
|
|
} |
357
|
|
|
|
358
|
|
|
/** |
359
|
|
|
* Turns off autocommit mode. While autocommit mode is turned off, changes made to the database via the PDO |
360
|
|
|
* object instance are not committed until you end the transaction by calling ProductProcessor::commit(). |
361
|
|
|
* Calling ProductProcessor::rollBack() will roll back all changes to the database and return the connection |
362
|
|
|
* to autocommit mode. |
363
|
|
|
* |
364
|
|
|
* @return boolean Returns TRUE on success or FALSE on failure |
365
|
|
|
* @link http://php.net/manual/en/pdo.begintransaction.php |
366
|
|
|
*/ |
367
|
|
|
public function beginTransaction() |
368
|
|
|
{ |
369
|
|
|
return $this->connection->beginTransaction(); |
370
|
|
|
} |
371
|
|
|
|
372
|
|
|
/** |
373
|
|
|
* Commits a transaction, returning the database connection to autocommit mode until the next call to |
374
|
|
|
* ProductProcessor::beginTransaction() starts a new transaction. |
375
|
|
|
* |
376
|
|
|
* @return boolean Returns TRUE on success or FALSE on failure |
377
|
|
|
* @link http://php.net/manual/en/pdo.commit.php |
378
|
|
|
*/ |
379
|
|
|
public function commit() |
380
|
|
|
{ |
381
|
|
|
return $this->connection->commit(); |
382
|
|
|
} |
383
|
|
|
|
384
|
|
|
/** |
385
|
|
|
* Rolls back the current transaction, as initiated by ProductProcessor::beginTransaction(). |
386
|
|
|
* |
387
|
|
|
* If the database was set to autocommit mode, this function will restore autocommit mode after it has |
388
|
|
|
* rolled back the transaction. |
389
|
|
|
* |
390
|
|
|
* Some databases, including MySQL, automatically issue an implicit COMMIT when a database definition |
391
|
|
|
* language (DDL) statement such as DROP TABLE or CREATE TABLE is issued within a transaction. The implicit |
392
|
|
|
* COMMIT will prevent you from rolling back any other changes within the transaction boundary. |
393
|
|
|
* |
394
|
|
|
* @return boolean Returns TRUE on success or FALSE on failure |
395
|
|
|
* @link http://php.net/manual/en/pdo.rollback.php |
396
|
|
|
*/ |
397
|
|
|
public function rollBack() |
398
|
|
|
{ |
399
|
|
|
return $this->connection->rollBack(); |
400
|
|
|
} |
401
|
|
|
|
402
|
|
|
/** |
403
|
|
|
* Set's the repository to access EAV attribute option values. |
404
|
|
|
* |
405
|
|
|
* @param \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository The repository to access EAV attribute option values |
406
|
|
|
* |
407
|
|
|
* @return void |
408
|
|
|
*/ |
409
|
|
|
public function setEavAttributeOptionValueRepository(EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository) |
410
|
|
|
{ |
411
|
|
|
$this->eavAttributeOptionValueRepository = $eavAttributeOptionValueRepository; |
412
|
|
|
} |
413
|
|
|
|
414
|
|
|
/** |
415
|
|
|
* Return's the repository to access EAV attribute option values. |
416
|
|
|
* |
417
|
|
|
* @return \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface The repository instance |
418
|
|
|
*/ |
419
|
|
|
public function getEavAttributeOptionValueRepository() |
420
|
|
|
{ |
421
|
|
|
return $this->eavAttributeOptionValueRepository; |
422
|
|
|
} |
423
|
|
|
|
424
|
|
|
/** |
425
|
|
|
* Set's the repository to access EAV attributes. |
426
|
|
|
* |
427
|
|
|
* @param \TechDivision\Import\Repositories\EavAttributeRepositoryInterface $eavAttributeRepository The repository to access EAV attributes |
428
|
|
|
* |
429
|
|
|
* @return void |
430
|
|
|
*/ |
431
|
|
|
public function setEavAttributeRepository(EavAttributeRepositoryInterface $eavAttributeRepository) |
432
|
|
|
{ |
433
|
|
|
$this->eavAttributeRepository = $eavAttributeRepository; |
434
|
|
|
} |
435
|
|
|
|
436
|
|
|
/** |
437
|
|
|
* Return's the repository to access EAV attributes. |
438
|
|
|
* |
439
|
|
|
* @return \TechDivision\Import\Repositories\EavAttributeRepositoryInterface The repository instance |
440
|
|
|
*/ |
441
|
|
|
public function getEavAttributeRepository() |
442
|
|
|
{ |
443
|
|
|
return $this->eavEntityTypeRepository; |
|
|
|
|
444
|
|
|
} |
445
|
|
|
|
446
|
|
|
/** |
447
|
|
|
* Set's the repository to access EAV entity types. |
448
|
|
|
* |
449
|
|
|
* @param \TechDivision\Import\Repositories\EavEntityTypeRepositoryInterface $eavEntityTypeRepository The repository to access EAV entity types |
450
|
|
|
* |
451
|
|
|
* @return void |
452
|
|
|
*/ |
453
|
|
|
public function setEavEntityTypeRepository(EavEntityTypeRepositoryInterface $eavEntityTypeRepository) |
454
|
|
|
{ |
455
|
|
|
$this->eavEntityTypeRepository = $eavEntityTypeRepository; |
456
|
|
|
} |
457
|
|
|
|
458
|
|
|
/** |
459
|
|
|
* Return's the repository to access EAV entity types. |
460
|
|
|
* |
461
|
|
|
* @return \TechDivision\Import\Repositories\EavEntityTypeRepositoryInterface The repository instance |
462
|
|
|
*/ |
463
|
|
|
public function getEavEntityTypeRepository() |
464
|
|
|
{ |
465
|
|
|
return $this->eavEntityTypeRepository; |
466
|
|
|
} |
467
|
|
|
|
468
|
|
|
/** |
469
|
|
|
* Set's the action with the product CRUD methods. |
470
|
|
|
* |
471
|
|
|
* @param ActionInterface $productAction The action with the product CRUD methods |
472
|
|
|
* |
473
|
|
|
* @return void |
474
|
|
|
*/ |
475
|
|
|
public function setProductAction(ActionInterface $productAction) |
476
|
|
|
{ |
477
|
|
|
$this->productAction = $productAction; |
478
|
|
|
} |
479
|
|
|
|
480
|
|
|
/** |
481
|
|
|
* Return's the action with the product CRUD methods. |
482
|
|
|
* |
483
|
|
|
* @return ActionInterface The action instance |
484
|
|
|
*/ |
485
|
|
|
public function getProductAction() |
486
|
|
|
{ |
487
|
|
|
return $this->productAction; |
488
|
|
|
} |
489
|
|
|
|
490
|
|
|
/** |
491
|
|
|
* Set's the action with the product varchar attribute CRUD methods. |
492
|
|
|
* |
493
|
|
|
* @param ActionInterface $productVarcharAction The action with the product varchar attriute CRUD methods |
494
|
|
|
* |
495
|
|
|
* @return void |
496
|
|
|
*/ |
497
|
|
|
public function setProductVarcharAction(ActionInterface $productVarcharAction) |
498
|
|
|
{ |
499
|
|
|
$this->productVarcharAction = $productVarcharAction; |
500
|
|
|
} |
501
|
|
|
|
502
|
|
|
/** |
503
|
|
|
* Return's the action with the product varchar attribute CRUD methods. |
504
|
|
|
* |
505
|
|
|
* @return ActionInterface The action instance |
506
|
|
|
*/ |
507
|
|
|
public function getProductVarcharAction() |
508
|
|
|
{ |
509
|
|
|
return $this->productVarcharAction; |
510
|
|
|
} |
511
|
|
|
|
512
|
|
|
/** |
513
|
|
|
* Set's the action with the product text attribute CRUD methods. |
514
|
|
|
* |
515
|
|
|
* @param ActionInterface $productTextAction The action with the product text attriute CRUD methods |
516
|
|
|
* |
517
|
|
|
* @return void |
518
|
|
|
*/ |
519
|
|
|
public function setProductTextAction(ActionInterface $productTextAction) |
520
|
|
|
{ |
521
|
|
|
$this->productTextAction = $productTextAction; |
522
|
|
|
} |
523
|
|
|
|
524
|
|
|
/** |
525
|
|
|
* Return's the action with the product text attribute CRUD methods. |
526
|
|
|
* |
527
|
|
|
* @return ActionInterface The action instance |
528
|
|
|
*/ |
529
|
|
|
public function getProductTextAction() |
530
|
|
|
{ |
531
|
|
|
return $this->productTextAction; |
532
|
|
|
} |
533
|
|
|
|
534
|
|
|
/** |
535
|
|
|
* Set's the action with the product int attribute CRUD methods. |
536
|
|
|
* |
537
|
|
|
* @param ActionInterface $productIntAction The action with the product int attriute CRUD methods |
538
|
|
|
* |
539
|
|
|
* @return void |
540
|
|
|
*/ |
541
|
|
|
public function setProductIntAction(ActionInterface $productIntAction) |
542
|
|
|
{ |
543
|
|
|
$this->productIntAction = $productIntAction; |
544
|
|
|
} |
545
|
|
|
|
546
|
|
|
/** |
547
|
|
|
* Return's the action with the product int attribute CRUD methods. |
548
|
|
|
* |
549
|
|
|
* @return ActionInterface The action instance |
550
|
|
|
*/ |
551
|
|
|
public function getProductIntAction() |
552
|
|
|
{ |
553
|
|
|
return $this->productIntAction; |
554
|
|
|
} |
555
|
|
|
|
556
|
|
|
/** |
557
|
|
|
* Set's the action with the product decimal attribute CRUD methods. |
558
|
|
|
* |
559
|
|
|
* @param ActionInterface $productDecimalAction The action with the product decimal attriute CRUD methods |
560
|
|
|
* |
561
|
|
|
* @return void |
562
|
|
|
*/ |
563
|
|
|
public function setProductDecimalAction(ActionInterface $productDecimalAction) |
564
|
|
|
{ |
565
|
|
|
$this->productDecimalAction = $productDecimalAction; |
566
|
|
|
} |
567
|
|
|
|
568
|
|
|
/** |
569
|
|
|
* Return's the action with the product decimal attribute CRUD methods. |
570
|
|
|
* |
571
|
|
|
* @return ActionInterface The action instance |
572
|
|
|
*/ |
573
|
|
|
public function getProductDecimalAction() |
574
|
|
|
{ |
575
|
|
|
return $this->productDecimalAction; |
576
|
|
|
} |
577
|
|
|
|
578
|
|
|
/** |
579
|
|
|
* Set's the action with the product datetime attribute CRUD methods. |
580
|
|
|
* |
581
|
|
|
* @param ActionInterface $productDatetimeAction The action with the product datetime attriute CRUD methods |
582
|
|
|
* |
583
|
|
|
* @return void |
584
|
|
|
*/ |
585
|
|
|
public function setProductDatetimeAction(ActionInterface $productDatetimeAction) |
586
|
|
|
{ |
587
|
|
|
$this->productDatetimeAction = $productDatetimeAction; |
588
|
|
|
} |
589
|
|
|
|
590
|
|
|
/** |
591
|
|
|
* Return's the action with the product datetime attribute CRUD methods. |
592
|
|
|
* |
593
|
|
|
* @return ActionInterface The action instance |
594
|
|
|
*/ |
595
|
|
|
public function getProductDatetimeAction() |
596
|
|
|
{ |
597
|
|
|
return $this->productDatetimeAction; |
598
|
|
|
} |
599
|
|
|
|
600
|
|
|
/** |
601
|
|
|
* Set's the action with the product website CRUD methods. |
602
|
|
|
* |
603
|
|
|
* @param ActionInterface $productWebsiteAction The action with the product website CRUD methods |
604
|
|
|
* |
605
|
|
|
* @return void |
606
|
|
|
*/ |
607
|
|
|
public function setProductWebsiteAction(ActionInterface $productWebsiteAction) |
608
|
|
|
{ |
609
|
|
|
$this->productWebsiteAction = $productWebsiteAction; |
610
|
|
|
} |
611
|
|
|
|
612
|
|
|
/** |
613
|
|
|
* Return's the action with the product website CRUD methods. |
614
|
|
|
* |
615
|
|
|
* @return ActionInterface The action instance |
616
|
|
|
*/ |
617
|
|
|
public function getProductWebsiteAction() |
618
|
|
|
{ |
619
|
|
|
return $this->productWebsiteAction; |
620
|
|
|
} |
621
|
|
|
|
622
|
|
|
/** |
623
|
|
|
* Set's the action with the category product relation CRUD methods. |
624
|
|
|
* |
625
|
|
|
* @param ActionInterface $categoryProductAction The action with the category product relation CRUD methods |
626
|
|
|
* |
627
|
|
|
* @return void |
628
|
|
|
*/ |
629
|
|
|
public function setCategoryProductAction(ActionInterface $categoryProductAction) |
630
|
|
|
{ |
631
|
|
|
$this->categoryProductAction = $categoryProductAction; |
632
|
|
|
} |
633
|
|
|
|
634
|
|
|
/** |
635
|
|
|
* Return's the action with the category product relation CRUD methods. |
636
|
|
|
* |
637
|
|
|
* @return ActionInterface The action instance |
638
|
|
|
*/ |
639
|
|
|
public function getCategoryProductAction() |
640
|
|
|
{ |
641
|
|
|
return $this->categoryProductAction; |
642
|
|
|
} |
643
|
|
|
|
644
|
|
|
/** |
645
|
|
|
* Set's the action with the stock item CRUD methods. |
646
|
|
|
* |
647
|
|
|
* @param ActionInterface $stockItemAction The action with the stock item CRUD methods |
648
|
|
|
* |
649
|
|
|
* @return void |
650
|
|
|
*/ |
651
|
|
|
public function setStockItemAction(ActionInterface $stockItemAction) |
652
|
|
|
{ |
653
|
|
|
$this->stockItemAction = $stockItemAction; |
654
|
|
|
} |
655
|
|
|
|
656
|
|
|
/** |
657
|
|
|
* Return's the action with the stock item CRUD methods. |
658
|
|
|
* |
659
|
|
|
* @return ActionInterface The action instance |
660
|
|
|
*/ |
661
|
|
|
public function getStockItemAction() |
662
|
|
|
{ |
663
|
|
|
return $this->stockItemAction; |
664
|
|
|
} |
665
|
|
|
|
666
|
|
|
/** |
667
|
|
|
* Set's the action with the URL rewrite CRUD methods. |
668
|
|
|
* |
669
|
|
|
* @param \TechDivision\Import\Dbal\Actions\ActionInterface $urlRewriteAction The action with the URL rewrite CRUD methods |
670
|
|
|
* |
671
|
|
|
* @return void |
672
|
|
|
*/ |
673
|
|
|
public function setUrlRewriteAction(ActionInterface $urlRewriteAction) |
674
|
|
|
{ |
675
|
|
|
$this->urlRewriteAction = $urlRewriteAction; |
676
|
|
|
} |
677
|
|
|
|
678
|
|
|
/** |
679
|
|
|
* Return's the action with the URL rewrite CRUD methods. |
680
|
|
|
* |
681
|
|
|
* @return \TechDivision\Import\Dbal\Actions\ActionInterface The action instance |
682
|
|
|
*/ |
683
|
|
|
public function getUrlRewriteAction() |
684
|
|
|
{ |
685
|
|
|
return $this->urlRewriteAction; |
686
|
|
|
} |
687
|
|
|
|
688
|
|
|
/** |
689
|
|
|
* Set's the repository to load the products with. |
690
|
|
|
* |
691
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductRepositoryInterface $productRepository The repository instance |
692
|
|
|
* |
693
|
|
|
* @return void |
694
|
|
|
*/ |
695
|
|
|
public function setProductRepository(ProductRepositoryInterface $productRepository) |
696
|
|
|
{ |
697
|
|
|
$this->productRepository = $productRepository; |
698
|
|
|
} |
699
|
|
|
|
700
|
|
|
/** |
701
|
|
|
* Return's the repository to load the products with. |
702
|
|
|
* |
703
|
|
|
* @return \TechDivision\Import\Product\Repositories\ProductRepositoryInterface The repository instance |
704
|
|
|
*/ |
705
|
|
|
public function getProductRepository() |
706
|
|
|
{ |
707
|
|
|
return $this->productRepository; |
708
|
|
|
} |
709
|
|
|
|
710
|
|
|
/** |
711
|
|
|
* Set's the repository to load the product website relations with. |
712
|
|
|
* |
713
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductWebsiteRepositoryInterface $productWebsiteRepository The repository instance |
714
|
|
|
* |
715
|
|
|
* @return void |
716
|
|
|
*/ |
717
|
|
|
public function setProductWebsiteRepository(ProductWebsiteRepositoryInterface $productWebsiteRepository) |
718
|
|
|
{ |
719
|
|
|
$this->productWebsiteRepository = $productWebsiteRepository; |
720
|
|
|
} |
721
|
|
|
|
722
|
|
|
/** |
723
|
|
|
* Return's the repository to load the product website relations with. |
724
|
|
|
* |
725
|
|
|
* @return \TechDivision\Import\Product\Repositories\ProductWebsiteRepositoryInterface The repository instance |
726
|
|
|
*/ |
727
|
|
|
public function getProductWebsiteRepository() |
728
|
|
|
{ |
729
|
|
|
return $this->productWebsiteRepository; |
730
|
|
|
} |
731
|
|
|
|
732
|
|
|
/** |
733
|
|
|
* Set's the repository to load the product datetime attribute with. |
734
|
|
|
* |
735
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductDatetimeRepositoryInterface $productDatetimeRepository The repository instance |
736
|
|
|
* |
737
|
|
|
* @return void |
738
|
|
|
*/ |
739
|
|
|
public function setProductDatetimeRepository(ProductDatetimeRepositoryInterface $productDatetimeRepository) |
740
|
|
|
{ |
741
|
|
|
$this->productDatetimeRepository = $productDatetimeRepository; |
742
|
|
|
} |
743
|
|
|
|
744
|
|
|
/** |
745
|
|
|
* Return's the repository to load the product datetime attribute with. |
746
|
|
|
* |
747
|
|
|
* @return \TechDivision\Import\Product\Repositories\ProductDatetimeRepositoryInterface The repository instance |
748
|
|
|
*/ |
749
|
|
|
public function getProductDatetimeRepository() |
750
|
|
|
{ |
751
|
|
|
return $this->productDatetimeRepository; |
752
|
|
|
} |
753
|
|
|
|
754
|
|
|
/** |
755
|
|
|
* Set's the repository to load the product decimal attribute with. |
756
|
|
|
* |
757
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductDecimalRepositoryInterface $productDecimalRepository The repository instance |
758
|
|
|
* |
759
|
|
|
* @return void |
760
|
|
|
*/ |
761
|
|
|
public function setProductDecimalRepository(ProductDecimalRepositoryInterface $productDecimalRepository) |
762
|
|
|
{ |
763
|
|
|
$this->productDecimalRepository = $productDecimalRepository; |
764
|
|
|
} |
765
|
|
|
|
766
|
|
|
/** |
767
|
|
|
* Return's the repository to load the product decimal attribute with. |
768
|
|
|
* |
769
|
|
|
* @return \TechDivision\Import\Product\Repositories\ProductDecimalRepositoryInterface The repository instance |
770
|
|
|
*/ |
771
|
|
|
public function getProductDecimalRepository() |
772
|
|
|
{ |
773
|
|
|
return $this->productDecimalRepository; |
774
|
|
|
} |
775
|
|
|
|
776
|
|
|
/** |
777
|
|
|
* Set's the repository to load the product integer attribute with. |
778
|
|
|
* |
779
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductIntRepositoryInterface $productIntRepository The repository instance |
780
|
|
|
* |
781
|
|
|
* @return void |
782
|
|
|
*/ |
783
|
|
|
public function setProductIntRepository(ProductIntRepositoryInterface $productIntRepository) |
784
|
|
|
{ |
785
|
|
|
$this->productIntRepository = $productIntRepository; |
786
|
|
|
} |
787
|
|
|
|
788
|
|
|
/** |
789
|
|
|
* Return's the repository to load the product integer attribute with. |
790
|
|
|
* |
791
|
|
|
* @return \TechDivision\Import\Product\Repositories\ProductIntRepositoryInterface The repository instance |
792
|
|
|
*/ |
793
|
|
|
public function getProductIntRepository() |
794
|
|
|
{ |
795
|
|
|
return $this->productIntRepository; |
796
|
|
|
} |
797
|
|
|
|
798
|
|
|
/** |
799
|
|
|
* Set's the repository to load the product text attribute with. |
800
|
|
|
* |
801
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductTextRepositoryInterface $productTextRepository The repository instance |
802
|
|
|
* |
803
|
|
|
* @return void |
804
|
|
|
*/ |
805
|
|
|
public function setProductTextRepository(ProductTextRepositoryInterface $productTextRepository) |
806
|
|
|
{ |
807
|
|
|
$this->productTextRepository = $productTextRepository; |
808
|
|
|
} |
809
|
|
|
|
810
|
|
|
/** |
811
|
|
|
* Return's the repository to load the product text attribute with. |
812
|
|
|
* |
813
|
|
|
* @return \TechDivision\Import\Product\Repositories\ProductTextRepositoryInterface The repository instance |
814
|
|
|
*/ |
815
|
|
|
public function getProductTextRepository() |
816
|
|
|
{ |
817
|
|
|
return $this->productTextRepository; |
818
|
|
|
} |
819
|
|
|
|
820
|
|
|
/** |
821
|
|
|
* Set's the repository to load the product varchar attribute with. |
822
|
|
|
* |
823
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductVarcharRepositoryInterface $productVarcharRepository The repository instance |
824
|
|
|
* |
825
|
|
|
* @return void |
826
|
|
|
*/ |
827
|
|
|
public function setProductVarcharRepository(ProductVarcharRepositoryInterface $productVarcharRepository) |
828
|
|
|
{ |
829
|
|
|
$this->productVarcharRepository = $productVarcharRepository; |
830
|
|
|
} |
831
|
|
|
|
832
|
|
|
/** |
833
|
|
|
* Return's the repository to load the product varchar attribute with. |
834
|
|
|
* |
835
|
|
|
* @return \TechDivision\Import\Product\Repositories\ProductVarcharRepositoryInterface The repository instance |
836
|
|
|
*/ |
837
|
|
|
public function getProductVarcharRepository() |
838
|
|
|
{ |
839
|
|
|
return $this->productVarcharRepository; |
840
|
|
|
} |
841
|
|
|
|
842
|
|
|
/** |
843
|
|
|
* Set's the repository to load the category product relations with. |
844
|
|
|
* |
845
|
|
|
* @param \TechDivision\Import\Product\Repositories\CategoryProductRepositoryInterface $categoryProductRepository The repository instance |
846
|
|
|
* |
847
|
|
|
* @return void |
848
|
|
|
*/ |
849
|
|
|
public function setCategoryProductRepository(CategoryProductRepositoryInterface $categoryProductRepository) |
850
|
|
|
{ |
851
|
|
|
$this->categoryProductRepository = $categoryProductRepository; |
852
|
|
|
} |
853
|
|
|
|
854
|
|
|
/** |
855
|
|
|
* Return's the repository to load the category product relations with. |
856
|
|
|
* |
857
|
|
|
* @return \TechDivision\Import\Product\Repositories\CategoryProductRepositoryInterface The repository instance |
858
|
|
|
*/ |
859
|
|
|
public function getCategoryProductRepository() |
860
|
|
|
{ |
861
|
|
|
return $this->categoryProductRepository; |
862
|
|
|
} |
863
|
|
|
|
864
|
|
|
/** |
865
|
|
|
* Set's the repository to load the stock items with. |
866
|
|
|
* |
867
|
|
|
* @param \TechDivision\Import\Product\Repositories\StockItemRepositoryInterface $stockItemRepository The repository instance |
868
|
|
|
* |
869
|
|
|
* @return void |
870
|
|
|
*/ |
871
|
|
|
public function setStockItemRepository(StockItemRepositoryInterface $stockItemRepository) |
872
|
|
|
{ |
873
|
|
|
$this->stockItemRepository = $stockItemRepository; |
874
|
|
|
} |
875
|
|
|
|
876
|
|
|
/** |
877
|
|
|
* Return's the repository to load the stock items with. |
878
|
|
|
* |
879
|
|
|
* @return \TechDivision\Import\Product\Repositories\StockItemRepositoryInterface The repository instance |
880
|
|
|
*/ |
881
|
|
|
public function getStockItemRepository() |
882
|
|
|
{ |
883
|
|
|
return $this->stockItemRepository; |
884
|
|
|
} |
885
|
|
|
|
886
|
|
|
/** |
887
|
|
|
* Set's the assembler to load the product attributes with. |
888
|
|
|
* |
889
|
|
|
* @param \TechDivision\Import\Product\Assemblers\ProductAttributeAssemblerInterface $productAttributeAssembler The assembler instance |
890
|
|
|
* |
891
|
|
|
* @return void |
892
|
|
|
*/ |
893
|
|
|
public function setProductAttributeAssembler(ProductAttributeAssemblerInterface $productAttributeAssembler) |
894
|
|
|
{ |
895
|
|
|
$this->productAttributeAssembler = $productAttributeAssembler; |
896
|
|
|
} |
897
|
|
|
|
898
|
|
|
/** |
899
|
|
|
* Return's the assembler to load the product attributes with. |
900
|
|
|
* |
901
|
|
|
* @return \TechDivision\Import\Product\Assemblers\ProductAttributeAssemblerInterface The assembler instance |
902
|
|
|
*/ |
903
|
|
|
public function getProductAttributeAssembler() |
904
|
|
|
{ |
905
|
|
|
return $this->productAttributeAssembler; |
906
|
|
|
} |
907
|
|
|
|
908
|
|
|
/** |
909
|
|
|
* Set's the repository to load the URL rewrites with. |
910
|
|
|
* |
911
|
|
|
* @param \TechDivision\Import\Repositories\UrlRewriteRepositoryInterface $urlRewriteRepository The repository instance |
912
|
|
|
* |
913
|
|
|
* @return void |
914
|
|
|
*/ |
915
|
|
|
public function setUrlRewriteRepository(UrlRewriteRepositoryInterface $urlRewriteRepository) |
916
|
|
|
{ |
917
|
|
|
$this->urlRewriteRepository = $urlRewriteRepository; |
918
|
|
|
} |
919
|
|
|
|
920
|
|
|
/** |
921
|
|
|
* Return's the repository to load the URL rewrites with. |
922
|
|
|
* |
923
|
|
|
* @return \TechDivision\Import\Repositories\UrlRewriteRepositoryInterface The repository instance |
924
|
|
|
*/ |
925
|
|
|
public function getUrlRewriteRepository() |
926
|
|
|
{ |
927
|
|
|
return $this->urlRewriteRepository; |
928
|
|
|
} |
929
|
|
|
|
930
|
|
|
/** |
931
|
|
|
* Return's an array with the available EAV attributes for the passed is user defined flag. |
932
|
|
|
* |
933
|
|
|
* @param integer $isUserDefined The flag itself |
934
|
|
|
* |
935
|
|
|
* @return array The array with the EAV attributes matching the passed flag |
936
|
|
|
*/ |
937
|
|
|
public function getEavAttributeByIsUserDefined($isUserDefined = 1) |
938
|
|
|
{ |
939
|
|
|
return $this->getEavAttributeRepository()->findAllByIsUserDefined($isUserDefined); |
940
|
|
|
} |
941
|
|
|
|
942
|
|
|
/** |
943
|
|
|
* Return's the category product relations for the product with the passed SKU. |
944
|
|
|
* |
945
|
|
|
* @param string $sku The product SKU to load the category relations for |
946
|
|
|
* |
947
|
|
|
* @return array The category product relations for the product with the passed SKU |
948
|
|
|
*/ |
949
|
|
|
public function getCategoryProductsBySku($sku) |
950
|
|
|
{ |
951
|
|
|
return $this->getCategoryProductRepository()->findAllBySku($sku); |
952
|
|
|
} |
953
|
|
|
|
954
|
|
|
/** |
955
|
|
|
* Intializes the existing attributes for the entity with the passed primary key. |
956
|
|
|
* |
957
|
|
|
* @param string $pk The primary key of the entity to load the attributes for |
958
|
|
|
* @param integer $storeId The ID of the store view to load the attributes for |
959
|
|
|
* |
960
|
|
|
* @return array The entity attributes |
961
|
|
|
*/ |
962
|
|
|
public function getProductAttributesByPrimaryKeyAndStoreId($pk, $storeId) |
963
|
|
|
{ |
964
|
|
|
return $this->getProductAttributeAssembler()->getProductAttributesByPrimaryKeyAndStoreId($pk, $storeId); |
965
|
|
|
} |
966
|
|
|
|
967
|
|
|
/** |
968
|
|
|
* Load's and return's a raw entity without primary key but the mandatory members only and nulled values. |
969
|
|
|
* |
970
|
|
|
* @param string $entityTypeCode The entity type code to return the raw entity for |
971
|
|
|
* @param array $data An array with data that will be used to initialize the raw entity with |
972
|
|
|
* |
973
|
|
|
* @return array The initialized entity |
974
|
|
|
*/ |
975
|
|
|
public function loadRawEntity($entityTypeCode, array $data = array()) |
976
|
|
|
{ |
977
|
|
|
return $this->getRawEntityLoader()->load($entityTypeCode, $data); |
|
|
|
|
978
|
|
|
} |
979
|
|
|
|
980
|
|
|
/** |
981
|
|
|
* Load's and return's the EAV attribute option value with the passed entity type ID, code, store ID and value. |
982
|
|
|
* |
983
|
|
|
* @param string $entityTypeId The entity type ID of the EAV attribute to load the option value for |
984
|
|
|
* @param string $attributeCode The code of the EAV attribute option to load |
985
|
|
|
* @param integer $storeId The store ID of the attribute option to load |
986
|
|
|
* @param string $value The value of the attribute option to load |
987
|
|
|
* |
988
|
|
|
* @return array The EAV attribute option value |
989
|
|
|
*/ |
990
|
|
|
public function loadAttributeOptionValueByEntityTypeIdAndAttributeCodeAndStoreIdAndValue($entityTypeId, $attributeCode, $storeId, $value) |
991
|
|
|
{ |
992
|
|
|
return $this->getEavAttributeOptionValueRepository()->findOneByEntityTypeIdAndAttributeCodeAndStoreIdAndValue($entityTypeId, $attributeCode, $storeId, $value); |
993
|
|
|
} |
994
|
|
|
|
995
|
|
|
/** |
996
|
|
|
* Load's and return's the available products. |
997
|
|
|
* |
998
|
|
|
* @return array The available products |
999
|
|
|
*/ |
1000
|
|
|
public function loadProducts() |
1001
|
|
|
{ |
1002
|
|
|
return $this->getProductRepository()->findAll(); |
1003
|
|
|
} |
1004
|
|
|
|
1005
|
|
|
/** |
1006
|
|
|
* Load's and return's the product with the passed SKU. |
1007
|
|
|
* |
1008
|
|
|
* @param string $sku The SKU of the product to load |
1009
|
|
|
* |
1010
|
|
|
* @return array The product |
1011
|
|
|
*/ |
1012
|
|
|
public function loadProduct($sku) |
1013
|
|
|
{ |
1014
|
|
|
return $this->getProductRepository()->findOneBySku($sku); |
1015
|
|
|
} |
1016
|
|
|
|
1017
|
|
|
/** |
1018
|
|
|
* Load's and return's the product website relation with the passed product and website ID. |
1019
|
|
|
* |
1020
|
|
|
* @param string $productId The product ID of the relation |
1021
|
|
|
* @param string $websiteId The website ID of the relation |
1022
|
|
|
* |
1023
|
|
|
* @return array The product website |
1024
|
|
|
*/ |
1025
|
|
|
public function loadProductWebsite($productId, $websiteId) |
1026
|
|
|
{ |
1027
|
|
|
return $this->getProductWebsiteRepository()->findOneByProductIdAndWebsite($productId, $websiteId); |
1028
|
|
|
} |
1029
|
|
|
|
1030
|
|
|
/** |
1031
|
|
|
* Load's and return's the product website relations for the product with the passed SKU. |
1032
|
|
|
* |
1033
|
|
|
* @param string $sku The SKU to of the product to load the product website relations for |
1034
|
|
|
* |
1035
|
|
|
* @return array The product website relations |
1036
|
|
|
*/ |
1037
|
|
|
public function loadProductWebsitesBySku($sku) |
1038
|
|
|
{ |
1039
|
|
|
return $this->getProductWebsiteRepository()->findAllBySku($sku); |
1040
|
|
|
} |
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) |
1051
|
|
|
{ |
1052
|
|
|
return $this->getCategoryProductRepository()->findOneByCategoryIdAndProductId($categoryId, $productId); |
1053
|
|
|
} |
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 item to load |
1059
|
|
|
* @param integer $websiteId The website ID of the stock item to load |
1060
|
|
|
* @param integer $stockId The stock ID of the stock item to load |
1061
|
|
|
* |
1062
|
|
|
* @return array The stock item |
1063
|
|
|
*/ |
1064
|
|
|
public function loadStockItem($productId, $websiteId, $stockId) |
1065
|
|
|
{ |
1066
|
|
|
return $this->getStockItemRepository()->findOneByProductIdAndWebsiteIdAndStockId($productId, $websiteId, $stockId); |
1067
|
|
|
} |
1068
|
|
|
|
1069
|
|
|
/** |
1070
|
|
|
* Load's and return's the varchar attribute with the passed params. |
1071
|
|
|
* |
1072
|
|
|
* @param integer $attributeCode The attribute code of the varchar attribute |
1073
|
|
|
* @param integer $entityTypeId The entity type ID of the varchar attribute |
1074
|
|
|
* @param integer $storeId The store ID of the varchar attribute |
1075
|
|
|
* @param string $value The value of the varchar attribute |
1076
|
|
|
* |
1077
|
|
|
* @return array|null The varchar attribute |
1078
|
|
|
*/ |
1079
|
|
|
public function loadVarcharAttributeByAttributeCodeAndEntityTypeIdAndStoreIdAndValue($attributeCode, $entityTypeId, $storeId, $value) |
1080
|
|
|
{ |
1081
|
|
|
return $this->loadProductVarcharAttributeByAttributeCodeAndEntityTypeIdAndStoreIdAndValue($attributeCode, $entityTypeId, $storeId, $value); |
1082
|
|
|
} |
1083
|
|
|
|
1084
|
|
|
/** |
1085
|
|
|
* Load's and return's the varchar attribute with the passed params. |
1086
|
|
|
* |
1087
|
|
|
* @param integer $attributeCode The attribute code of the varchar attribute |
1088
|
|
|
* @param integer $entityTypeId The entity type ID of the varchar attribute |
1089
|
|
|
* @param integer $storeId The store ID of the varchar attribute |
1090
|
|
|
* @param string $primaryKey The primary key of the product |
1091
|
|
|
* |
1092
|
|
|
* @return array|null The varchar attribute |
1093
|
|
|
*/ |
1094
|
|
|
public function loadVarcharAttributeByAttributeCodeAndEntityTypeIdAndStoreIdAndPrimaryKey($attributeCode, $entityTypeId, $storeId, $primaryKey) |
1095
|
|
|
{ |
1096
|
|
|
return $this->loadProductVarcharAttributeByAttributeCodeAndEntityTypeIdAndStoreIdAndPK($attributeCode, $entityTypeId, $storeId, $primaryKey); |
1097
|
|
|
} |
1098
|
|
|
|
1099
|
|
|
/** |
1100
|
|
|
* Load's and return's the varchar attribute with the passed params. |
1101
|
|
|
* |
1102
|
|
|
* @param integer $attributeCode The attribute code of the varchar attribute |
1103
|
|
|
* @param integer $entityTypeId The entity type ID of the varchar attribute |
1104
|
|
|
* @param integer $storeId The store ID of the varchar attribute |
1105
|
|
|
* @param string $value The value of the varchar attribute |
1106
|
|
|
* |
1107
|
|
|
* @return array|null The varchar attribute |
1108
|
|
|
*/ |
1109
|
|
|
public function loadProductVarcharAttributeByAttributeCodeAndEntityTypeIdAndStoreIdAndValue($attributeCode, $entityTypeId, $storeId, $value) |
1110
|
|
|
{ |
1111
|
|
|
return $this->getProductVarcharRepository()->findOneByAttributeCodeAndEntityTypeIdAndStoreIdAndValue($attributeCode, $entityTypeId, $storeId, $value); |
1112
|
|
|
} |
1113
|
|
|
|
1114
|
|
|
/** |
1115
|
|
|
* Load's and return's the varchar attribute with the passed params. |
1116
|
|
|
* |
1117
|
|
|
* @param integer $attributeCode The attribute code of the varchar attribute |
1118
|
|
|
* @param integer $entityTypeId The entity type ID of the varchar attribute |
1119
|
|
|
* @param integer $storeId The store ID of the varchar attribute |
1120
|
|
|
* @param string $pk The primary key of the product |
1121
|
|
|
* |
1122
|
|
|
* @return array|null The varchar attribute |
1123
|
|
|
*/ |
1124
|
|
|
public function loadProductVarcharAttributeByAttributeCodeAndEntityTypeIdAndStoreIdAndPK($attributeCode, $entityTypeId, $storeId, $pk) |
1125
|
|
|
{ |
1126
|
|
|
return $this->getProductVarcharRepository()->findOneByAttributeCodeAndEntityTypeIdAndStoreIdAndPk($attributeCode, $entityTypeId, $storeId, $pk); |
1127
|
|
|
} |
1128
|
|
|
|
1129
|
|
|
/** |
1130
|
|
|
* Return's an EAV entity type with the passed entity type code. |
1131
|
|
|
* |
1132
|
|
|
* @param string $entityTypeCode The code of the entity type to return |
1133
|
|
|
* |
1134
|
|
|
* @return array The entity type with the passed entity type code |
1135
|
|
|
*/ |
1136
|
|
|
public function loadEavEntityTypeByEntityTypeCode($entityTypeCode) |
1137
|
|
|
{ |
1138
|
|
|
return $this->getEavEntityTypeRepository()->findOneByEntityTypeCode($entityTypeCode); |
1139
|
|
|
} |
1140
|
|
|
|
1141
|
|
|
/** |
1142
|
|
|
* Load's and return's the URL rewrite for the given request path and store ID |
1143
|
|
|
* |
1144
|
|
|
* @param string $requestPath The request path to load the URL rewrite for |
1145
|
|
|
* @param int $storeId The store ID to load the URL rewrite for |
1146
|
|
|
* |
1147
|
|
|
* @return array|null The URL rewrite found for the given request path and store ID |
1148
|
|
|
*/ |
1149
|
|
|
public function loadUrlRewriteByRequestPathAndStoreId(string $requestPath, int $storeId) |
1150
|
|
|
{ |
1151
|
|
|
return $this->getUrlRewriteRepository()->findOneByRequestPathAndStoreId($requestPath, $storeId); |
|
|
|
|
1152
|
|
|
} |
1153
|
|
|
|
1154
|
|
|
/** |
1155
|
|
|
* Persist's the passed product data and return's the ID. |
1156
|
|
|
* |
1157
|
|
|
* @param array $product The product data to persist |
1158
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1159
|
|
|
* |
1160
|
|
|
* @return string The ID of the persisted entity |
1161
|
|
|
*/ |
1162
|
|
|
public function persistProduct($product, $name = null) |
1163
|
|
|
{ |
1164
|
|
|
return $this->getProductAction()->persist($product, $name); |
1165
|
|
|
} |
1166
|
|
|
|
1167
|
|
|
/** |
1168
|
|
|
* Persist's the passed product varchar attribute. |
1169
|
|
|
* |
1170
|
|
|
* @param array $attribute The attribute to persist |
1171
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1172
|
|
|
* |
1173
|
|
|
* @return string The ID of the persisted attribute |
1174
|
|
|
*/ |
1175
|
|
|
public function persistProductVarcharAttribute($attribute, $name = null) |
1176
|
|
|
{ |
1177
|
|
|
return $this->getProductVarcharAction()->persist($attribute, $name); |
1178
|
|
|
} |
1179
|
|
|
|
1180
|
|
|
/** |
1181
|
|
|
* Persist's the passed product integer attribute. |
1182
|
|
|
* |
1183
|
|
|
* @param array $attribute The attribute to persist |
1184
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1185
|
|
|
* |
1186
|
|
|
* @return void |
1187
|
|
|
*/ |
1188
|
|
|
public function persistProductIntAttribute($attribute, $name = null) |
1189
|
|
|
{ |
1190
|
|
|
$this->getProductIntAction()->persist($attribute, $name); |
1191
|
|
|
} |
1192
|
|
|
|
1193
|
|
|
/** |
1194
|
|
|
* Persist's the passed product decimal attribute. |
1195
|
|
|
* |
1196
|
|
|
* @param array $attribute The attribute to persist |
1197
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1198
|
|
|
* |
1199
|
|
|
* @return void |
1200
|
|
|
*/ |
1201
|
|
|
public function persistProductDecimalAttribute($attribute, $name = null) |
1202
|
|
|
{ |
1203
|
|
|
$this->getProductDecimalAction()->persist($attribute, $name); |
1204
|
|
|
} |
1205
|
|
|
|
1206
|
|
|
/** |
1207
|
|
|
* Persist's the passed product datetime attribute. |
1208
|
|
|
* |
1209
|
|
|
* @param array $attribute The attribute to persist |
1210
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1211
|
|
|
* |
1212
|
|
|
* @return void |
1213
|
|
|
*/ |
1214
|
|
|
public function persistProductDatetimeAttribute($attribute, $name = null) |
1215
|
|
|
{ |
1216
|
|
|
$this->getProductDatetimeAction()->persist($attribute, $name); |
1217
|
|
|
} |
1218
|
|
|
|
1219
|
|
|
/** |
1220
|
|
|
* Persist's the passed product text attribute. |
1221
|
|
|
* |
1222
|
|
|
* @param array $attribute The attribute to persist |
1223
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1224
|
|
|
* |
1225
|
|
|
* @return void |
1226
|
|
|
*/ |
1227
|
|
|
public function persistProductTextAttribute($attribute, $name = null) |
1228
|
|
|
{ |
1229
|
|
|
$this->getProductTextAction()->persist($attribute, $name); |
1230
|
|
|
} |
1231
|
|
|
|
1232
|
|
|
/** |
1233
|
|
|
* Persist's the passed product website data and return's the ID. |
1234
|
|
|
* |
1235
|
|
|
* @param array $productWebsite The product website data to persist |
1236
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1237
|
|
|
* |
1238
|
|
|
* @return void |
1239
|
|
|
*/ |
1240
|
|
|
public function persistProductWebsite($productWebsite, $name = null) |
1241
|
|
|
{ |
1242
|
|
|
$this->getProductWebsiteAction()->persist($productWebsite, $name); |
1243
|
|
|
} |
1244
|
|
|
|
1245
|
|
|
/** |
1246
|
|
|
* Persist's the passed category product relation. |
1247
|
|
|
* |
1248
|
|
|
* @param array $categoryProduct The category product relation to persist |
1249
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1250
|
|
|
* |
1251
|
|
|
* @return void |
1252
|
|
|
*/ |
1253
|
|
|
public function persistCategoryProduct($categoryProduct, $name = null) |
1254
|
|
|
{ |
1255
|
|
|
$this->getCategoryProductAction()->persist($categoryProduct, $name); |
1256
|
|
|
} |
1257
|
|
|
|
1258
|
|
|
/** |
1259
|
|
|
* Persist's the passed stock item data and return's the ID. |
1260
|
|
|
* |
1261
|
|
|
* @param array $stockItem The stock item data to persist |
1262
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1263
|
|
|
* |
1264
|
|
|
* @return void |
1265
|
|
|
*/ |
1266
|
|
|
public function persistStockItem($stockItem, $name = null) |
1267
|
|
|
{ |
1268
|
|
|
$this->getStockItemAction()->persist($stockItem, $name); |
1269
|
|
|
} |
1270
|
|
|
|
1271
|
|
|
/** |
1272
|
|
|
* Persist's the URL rewrite with the passed data. |
1273
|
|
|
* |
1274
|
|
|
* @param array $row The URL rewrite to persist |
1275
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1276
|
|
|
* |
1277
|
|
|
* @return string The ID of the persisted entity |
1278
|
|
|
*/ |
1279
|
|
|
public function persistUrlRewrite($row, $name = null) |
1280
|
|
|
{ |
1281
|
|
|
return $this->getUrlRewriteAction()->persist($row, $name); |
1282
|
|
|
} |
1283
|
|
|
|
1284
|
|
|
/** |
1285
|
|
|
* Delete's the entity with the passed attributes. |
1286
|
|
|
* |
1287
|
|
|
* @param array $row The attributes of the entity to delete |
1288
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1289
|
|
|
* |
1290
|
|
|
* @return void |
1291
|
|
|
*/ |
1292
|
|
|
public function deleteProduct($row, $name = null) |
1293
|
|
|
{ |
1294
|
|
|
$this->getProductAction()->delete($row, $name); |
1295
|
|
|
} |
1296
|
|
|
|
1297
|
|
|
/** |
1298
|
|
|
* Delete's the URL rewrite with the passed attributes. |
1299
|
|
|
* |
1300
|
|
|
* @param array $row The attributes of the entity to delete |
1301
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1302
|
|
|
* |
1303
|
|
|
* @return void |
1304
|
|
|
*/ |
1305
|
|
|
public function deleteUrlRewrite($row, $name = null) |
1306
|
|
|
{ |
1307
|
|
|
$this->getUrlRewriteAction()->delete($row, $name); |
1308
|
|
|
} |
1309
|
|
|
|
1310
|
|
|
/** |
1311
|
|
|
* Delete's the stock item(s) with the passed attributes. |
1312
|
|
|
* |
1313
|
|
|
* @param array $row The attributes of the entity to delete |
1314
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1315
|
|
|
* |
1316
|
|
|
* @return void |
1317
|
|
|
*/ |
1318
|
|
|
public function deleteStockItem($row, $name = null) |
1319
|
|
|
{ |
1320
|
|
|
$this->getStockItemAction()->delete($row, $name); |
1321
|
|
|
} |
1322
|
|
|
|
1323
|
|
|
/** |
1324
|
|
|
* Delete's the product website relations with the passed attributes. |
1325
|
|
|
* |
1326
|
|
|
* @param array $row The attributes of the entity to delete |
1327
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1328
|
|
|
* |
1329
|
|
|
* @return void |
1330
|
|
|
*/ |
1331
|
|
|
public function deleteProductWebsite($row, $name = null) |
1332
|
|
|
{ |
1333
|
|
|
$this->getProductWebsiteAction()->delete($row, $name); |
1334
|
|
|
} |
1335
|
|
|
|
1336
|
|
|
/** |
1337
|
|
|
* Delete's the category product relations with the passed attributes. |
1338
|
|
|
* |
1339
|
|
|
* @param array $row The attributes of the entity to delete |
1340
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1341
|
|
|
* |
1342
|
|
|
* @return void |
1343
|
|
|
*/ |
1344
|
|
|
public function deleteCategoryProduct($row, $name = null) |
1345
|
|
|
{ |
1346
|
|
|
$this->getCategoryProductAction()->delete($row, $name); |
1347
|
|
|
} |
1348
|
|
|
|
1349
|
|
|
/** |
1350
|
|
|
* Delete's the product datetime attribute with the passed attributes. |
1351
|
|
|
* |
1352
|
|
|
* @param array $row The attributes of the entity to delete |
1353
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1354
|
|
|
* |
1355
|
|
|
* @return void |
1356
|
|
|
*/ |
1357
|
|
|
public function deleteProductDatetimeAttribute($row, $name = null) |
1358
|
|
|
{ |
1359
|
|
|
$this->getProductDatetimeAction()->delete($row, $name); |
1360
|
|
|
} |
1361
|
|
|
|
1362
|
|
|
/** |
1363
|
|
|
* Delete's the product decimal attribute with the passed attributes. |
1364
|
|
|
* |
1365
|
|
|
* @param array $row The attributes of the entity to delete |
1366
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1367
|
|
|
* |
1368
|
|
|
* @return void |
1369
|
|
|
*/ |
1370
|
|
|
public function deleteProductDecimalAttribute($row, $name = null) |
1371
|
|
|
{ |
1372
|
|
|
$this->getProductDecimalAction()->delete($row, $name); |
1373
|
|
|
} |
1374
|
|
|
|
1375
|
|
|
/** |
1376
|
|
|
* Delete's the product integer attribute with the passed attributes. |
1377
|
|
|
* |
1378
|
|
|
* @param array $row The attributes of the entity to delete |
1379
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1380
|
|
|
* |
1381
|
|
|
* @return void |
1382
|
|
|
*/ |
1383
|
|
|
public function deleteProductIntAttribute($row, $name = null) |
1384
|
|
|
{ |
1385
|
|
|
$this->getProductIntAction()->delete($row, $name); |
1386
|
|
|
} |
1387
|
|
|
|
1388
|
|
|
/** |
1389
|
|
|
* Delete's the product text attribute with the passed attributes. |
1390
|
|
|
* |
1391
|
|
|
* @param array $row The attributes of the entity to delete |
1392
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1393
|
|
|
* |
1394
|
|
|
* @return void |
1395
|
|
|
*/ |
1396
|
|
|
public function deleteProductTextAttribute($row, $name = null) |
1397
|
|
|
{ |
1398
|
|
|
$this->getProductTextAction()->delete($row, $name); |
1399
|
|
|
} |
1400
|
|
|
|
1401
|
|
|
/** |
1402
|
|
|
* Delete's the product varchar attribute with the passed attributes. |
1403
|
|
|
* |
1404
|
|
|
* @param array $row The attributes of the entity to delete |
1405
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
1406
|
|
|
* |
1407
|
|
|
* @return void |
1408
|
|
|
*/ |
1409
|
|
|
public function deleteProductVarcharAttribute($row, $name = null) |
1410
|
|
|
{ |
1411
|
|
|
$this->getProductVarcharAction()->delete($row, $name); |
1412
|
|
|
} |
1413
|
|
|
|
1414
|
|
|
/** |
1415
|
|
|
* Clean-Up the repositories to free memory. |
1416
|
|
|
* |
1417
|
|
|
* @return void |
1418
|
|
|
*/ |
1419
|
|
|
public function cleanUp() |
1420
|
|
|
{ |
1421
|
|
|
} |
1422
|
|
|
} |
1423
|
|
|
|
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: