1 <?php
2 /* --------------------------------------------------------------
3 OrderServiceSettings.inc.php 2016-01-20
4 Gambio GmbH
5 http://www.gambio.de
6 Copyright (c) 2016 Gambio GmbH
7 Released under the GNU General Public License (Version 2)
8 [http://www.gnu.org/licenses/gpl-2.0.html]
9 --------------------------------------------------------------
10 */
11
12 MainFactory::load_class('OrderServiceSettingsInterface');
13
14 /**
15 * Value Object
16 *
17 * Class OrderServiceSettings
18 *
19 * Represents the default settings of an order
20 *
21 * @category System
22 * @package Order
23 * @subpackage ValueObjects
24 * @implements OrderServiceSettingsInterface
25 */
26 class OrderServiceSettings implements OrderServiceSettingsInterface
27 {
28 /**
29 * The default Id of an order status
30 *
31 * @var int
32 */
33 protected $defaultOrderStatusId;
34
35 /**
36 * The default Id of a customer status
37 *
38 * @var int
39 */
40 protected $defaultCustomerStatusId;
41
42 /**
43 * The default Id of a guest status id
44 *
45 * @var int
46 */
47 protected $defaultGuestStatusId;
48
49
50 /**
51 * Constructor of the class CustomerServiceSettings
52 *
53 * Sets default order status id from constant
54 */
55 public function __construct()
56 {
57 $this->defaultOrderStatusId = (int)DEFAULT_ORDERS_STATUS_ID;
58 $this->defaultCustomerStatusId = (int)DEFAULT_CUSTOMERS_STATUS_ID;
59 $this->defaultGuestStatusId = (int)DEFAULT_CUSTOMERS_STATUS_ID_GUEST;
60 }
61
62
63 /**
64 * Returns the default order status ID.
65 *
66 * @return int Default order status ID.
67 */
68 public function getDefaultOrderStatusId()
69 {
70 return $this->defaultOrderStatusId;
71 }
72
73
74 /**
75 * Returns the default customer status ID.
76 *
77 * @return int Default customer status ID.
78 */
79 public function getDefaultCustomerStatusId()
80 {
81 return $this->defaultCustomerStatusId;
82 }
83
84
85 /**
86 * Returns the default guest status ID.
87 *
88 * @return int Default guest status ID
89 */
90 public function getDefaultGuestStatusId()
91 {
92 return $this->defaultGuestStatusId;
93 }
94 }
95