1 <?php
2
3 /* --------------------------------------------------------------
4 ProductAttributeObjectService.inc.php 2016-01-18
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2016 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 ProductAttributeObjectService
15 *
16 * @category System
17 * @package ProductModule
18 * @subpackage Interfaces
19 */
20 class ProductAttributeObjectService implements ProductAttributeObjectServiceInterface
21 {
22 /**
23 * @var ProductAttributeFactoryInterface
24 */
25 protected $productAttributeFactory;
26
27
28 /**
29 * Initialize the product attribute object service.
30 *
31 * @param ProductAttributeFactoryInterface $productAttributeFactory
32 */
33 public function __construct(ProductAttributeFactoryInterface $productAttributeFactory)
34 {
35 $this->productAttributeFactory = $productAttributeFactory;
36 }
37
38
39 /**
40 * Creates a new instance of a product attribute object.
41 *
42 * @param IdType $optionId Option id of product attribute.
43 * @param IdType $valueId Value id of product attribute.
44 *
45 * @return ProductAttributeInterface New instance of product attribute.
46 */
47 public function createProductAttributeObject(IdType $optionId, IdType $valueId)
48 {
49 return $this->productAttributeFactory->createProductAttribute($optionId, $valueId);
50 }
51 }