1 | <?php |
||
15 | class Customer |
||
16 | { |
||
17 | const TYPE_NEW = 'n'; |
||
18 | const TYPE_GUEST = 'g'; |
||
19 | const TYPE_EXISTING = 'e'; |
||
20 | |||
21 | const GROUP_PRIVATE = 'p'; |
||
22 | const GROUP_BUSINESS = 'b'; |
||
23 | |||
24 | const LANGUAGE_GERMAN = 'de'; |
||
25 | const LANGUAGE_FRENCH = 'fr'; |
||
26 | const LANGUAGE_ITALIAN = 'it'; |
||
27 | const LANGUAGE_DUTCH = 'nl'; |
||
28 | |||
29 | /** |
||
30 | * @var ParameterBag |
||
31 | */ |
||
32 | protected $parameters; |
||
33 | |||
34 | /** |
||
35 | * Create a new item with the specified parameters |
||
36 | * |
||
37 | * @param array|null $parameters An array of parameters to set on the new object |
||
38 | */ |
||
39 | 49 | public function __construct($parameters = null) |
|
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | 11 | public function getGroup() |
|
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | 11 | public function getId() |
|
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | 11 | public function getLanguage() |
|
67 | |||
68 | /** |
||
69 | * @return array |
||
70 | */ |
||
71 | 1 | public function getParameters() |
|
75 | |||
76 | /** |
||
77 | * @return string |
||
78 | */ |
||
79 | 11 | public function getType() |
|
83 | |||
84 | /** |
||
85 | * Initialize this item with the specified parameters |
||
86 | * |
||
87 | * @param array|null $parameters An array of parameters to set on this object |
||
88 | * |
||
89 | * @return Customer |
||
90 | */ |
||
91 | 49 | public function initialize($parameters = null) |
|
103 | |||
104 | /** |
||
105 | * @param string $group |
||
106 | * |
||
107 | * @return Customer |
||
108 | */ |
||
109 | 49 | public function setGroup($group) |
|
115 | |||
116 | /** |
||
117 | * @param string $id |
||
118 | * |
||
119 | * @return Customer |
||
120 | */ |
||
121 | 37 | public function setId($id) |
|
127 | |||
128 | /** |
||
129 | * @param string $language Language as ISO 639-1 code |
||
130 | * |
||
131 | * @return Customer |
||
132 | */ |
||
133 | 37 | public function setLanguage($language) |
|
139 | |||
140 | /** |
||
141 | * @param string $type |
||
142 | * |
||
143 | * @return Customer |
||
144 | */ |
||
145 | 49 | public function setType($type) |
|
151 | |||
152 | /** |
||
153 | * @param string $key |
||
154 | * |
||
155 | * @return mixed |
||
156 | */ |
||
157 | 11 | protected function getParameter($key) |
|
161 | |||
162 | /** |
||
163 | * @param string $key |
||
164 | * @param mixed $value |
||
165 | * |
||
166 | * @return Customer |
||
167 | */ |
||
168 | 49 | protected function setParameter($key, $value) |
|
174 | } |
||
175 |