1 <?php
2
3 /* --------------------------------------------------------------
4 ProductAttributeFactory.inc.php 2016-01-07
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2015 Gambio GmbH
8 Released under the GNU General Public License (Version 2)
9 [http://www.gnu.org/licenses/gpl-2.0.html]
10 --------------------------------------------------------------
11 */
12
13 /**
14 * Class ProductAttributeFactory
15 *
16 * @category System
17 * @package ProductModule
18 * @subpackage Factories
19 */
20 class ProductAttributeFactory implements ProductAttributeFactoryInterface
21 {
22 /**
23 * Creates a new product attribute instance.
24 *
25 * @param IdType $optionId Option id of the created product attribute instance.
26 * @param IdType $valueId Value id of the created product attribute instance.
27 *
28 * @return ProductAttribute A new product attribute instance.
29 */
30 public function createProductAttribute(IdType $optionId, IdType $valueId)
31 {
32 return MainFactory::create('ProductAttribute', $optionId, $valueId);
33 }
34
35
36 /**
37 * Creates a new stored product attribute instance.
38 *
39 * @param IdType $productAttributeId Id of the created stored product attribute instance.
40 *
41 * @return StoredProductAttribute A new stored product attribute instance.
42 */
43 public function createStoredProductAttribute(IdType $productAttributeId)
44 {
45 return MainFactory::create('StoredProductAttribute', $productAttributeId);
46 }
47 }