1 | <?php |
||
21 | class Standard |
||
22 | extends \Aimeos\MShop\Common\Item\Base |
||
|
|||
23 | implements \Aimeos\MShop\Locale\Item\Language\Iface |
||
24 | { |
||
25 | |||
26 | private $modified = false; |
||
27 | private $values; |
||
28 | |||
29 | |||
30 | /** |
||
31 | * Initialize the language object. |
||
32 | * |
||
33 | * @param array $values Possible params to be set on init. |
||
34 | */ |
||
35 | public function __construct( array $values = [] ) |
||
45 | |||
46 | |||
47 | /** |
||
48 | * Returns the id of the language. |
||
49 | * |
||
50 | * @return string|null Id of the language |
||
51 | */ |
||
52 | public function getId() |
||
60 | |||
61 | |||
62 | /** |
||
63 | * Sets the id of the language. |
||
64 | * |
||
65 | * @param string $key Id to set |
||
66 | * @return \Aimeos\MShop\Locale\Item\Language\Iface Locale language item for chaining method calls |
||
67 | */ |
||
68 | public function setId( $key ) |
||
84 | |||
85 | |||
86 | /** |
||
87 | * Returns the two letter ISO language code. |
||
88 | * |
||
89 | * @return string two letter ISO language code |
||
90 | */ |
||
91 | public function getCode() |
||
99 | |||
100 | |||
101 | /** |
||
102 | * Sets the two letter ISO language code. |
||
103 | * |
||
104 | * @param string $key two letter ISO language code |
||
105 | * @return \Aimeos\MShop\Locale\Item\Language\Iface Locale language item for chaining method calls |
||
106 | */ |
||
107 | public function setCode( $key ) |
||
125 | |||
126 | |||
127 | /** |
||
128 | * Returns the label property. |
||
129 | * |
||
130 | * @return string Returns the label of the language |
||
131 | */ |
||
132 | public function getLabel() |
||
140 | |||
141 | |||
142 | /** |
||
143 | * Sets the label property. |
||
144 | * |
||
145 | * @param string $label Label of the language |
||
146 | * @return \Aimeos\MShop\Locale\Item\Language\Iface Locale language item for chaining method calls |
||
147 | */ |
||
148 | public function setLabel( $label ) |
||
158 | |||
159 | |||
160 | /** |
||
161 | * Returns the status of the item. |
||
162 | * |
||
163 | * @return integer Status of the item |
||
164 | */ |
||
165 | public function getStatus() |
||
173 | |||
174 | |||
175 | /** |
||
176 | * Sets the status of the item. |
||
177 | * |
||
178 | * @param integer $status Status of the item |
||
179 | * @return \Aimeos\MShop\Locale\Item\Language\Iface Locale language item for chaining method calls |
||
180 | */ |
||
181 | public function setStatus( $status ) |
||
191 | |||
192 | |||
193 | /** |
||
194 | * Returns the item type |
||
195 | * |
||
196 | * @return string Item type, subtypes are separated by slashes |
||
197 | */ |
||
198 | public function getResourceType() |
||
202 | |||
203 | |||
204 | /** |
||
205 | * Tests if the item is available based on status, time, language and currency |
||
206 | * |
||
207 | * @return boolean True if available, false if not |
||
208 | */ |
||
209 | public function isAvailable() |
||
213 | |||
214 | |||
215 | /** |
||
216 | * Sets the item values from the given array. |
||
217 | * |
||
218 | * @param array $list Associative list of item keys and their values |
||
219 | * @return array Associative list of keys and their values that are unknown |
||
220 | */ |
||
221 | public function fromArray( array $list ) |
||
240 | |||
241 | |||
242 | /** |
||
243 | * Returns the item values as array. |
||
244 | * |
||
245 | * @param boolean True to return private properties, false for public only |
||
246 | * @return array Associative list of item properties and their values |
||
247 | */ |
||
248 | public function toArray( $private = false ) |
||
259 | |||
260 | |||
261 | /** |
||
262 | * Tests if the needed object properties are modified. |
||
263 | * |
||
264 | * @return boolean True if modiefied flag was set otherwise false |
||
265 | */ |
||
266 | public function isModified() |
||
270 | |||
271 | } |
||
272 |