1 <?php
2
3 /* --------------------------------------------------------------
4 OrderItemPropertyFactory.inc.php 2015-11-05 gm
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 MainFactory::load_class('OrderItemAttributeFactoryInterface');
14
15 /**
16 * Class OrderItemPropertyFactory
17 *
18 * @category System
19 * @package Order
20 * @subpackage Factories
21 */
22 class OrderItemPropertyFactory implements OrderItemAttributeFactoryInterface
23 {
24 /**
25 * Creates an order item attribute instance.
26 *
27 * @param StringType $name Name of the property.
28 * @param StringType $value Value of the property.
29 *
30 * @return OrderItemProperty New order item attribute instance.
31 */
32 public function createOrderItemAttribute(StringType $name, StringType $value)
33 {
34 return MainFactory::create('OrderItemProperty', $name, $value);
35 }
36
37
38 /**
39 * Creates a stored order item property instance.
40 *
41 * @param IdType $orderItemAttributeId Database ID of the stored property instance.
42 *
43 * @return StoredOrderItemProperty New order item attribute instance.
44 */
45 public function createStoredOrderItemAttribute(IdType $orderItemAttributeId)
46 {
47 return MainFactory::create('StoredOrderItemProperty', $orderItemAttributeId);
48 }
49 }