1 | <?php |
||
21 | class Standard |
||
22 | extends \Aimeos\MShop\Common\Item\Base |
||
|
|||
23 | implements \Aimeos\MAdmin\Cache\Item\Iface |
||
24 | { |
||
25 | private $values; |
||
26 | |||
27 | |||
28 | /** |
||
29 | * Initializes the log item. |
||
30 | * |
||
31 | * @param array $values Associative list of key/value pairs |
||
32 | */ |
||
33 | public function __construct( array $values = [] ) |
||
39 | |||
40 | |||
41 | /** |
||
42 | * Returns the ID of the item if available. |
||
43 | * |
||
44 | * @return string|null ID of the item |
||
45 | */ |
||
46 | public function getId() |
||
52 | |||
53 | |||
54 | /** |
||
55 | * Sets the unique ID of the item. |
||
56 | * |
||
57 | * @param string $id Unique ID of the item |
||
58 | * @return \Aimeos\MAdmin\Cache\Item\Iface Cache item for chaining method calls |
||
59 | */ |
||
60 | public function setId( $id ) |
||
70 | |||
71 | |||
72 | /** |
||
73 | * Returns the ID of the site the item is stored |
||
74 | * |
||
75 | * @return string|null Site ID (or null if not available) |
||
76 | */ |
||
77 | public function getSiteId() |
||
83 | |||
84 | |||
85 | /** |
||
86 | * Returns the value associated to the key. |
||
87 | * |
||
88 | * @return string Returns the value of the item |
||
89 | */ |
||
90 | public function getValue() |
||
98 | |||
99 | |||
100 | /** |
||
101 | * Sets the new value of the item. |
||
102 | * |
||
103 | * @param string $value Value of the item or null for no expiration |
||
104 | * @return \Aimeos\MAdmin\Cache\Item\Iface Cache item for chaining method calls |
||
105 | */ |
||
106 | public function setValue( $value ) |
||
116 | |||
117 | |||
118 | /** |
||
119 | * Returns the expiration time of the item. |
||
120 | * |
||
121 | * @return string|null Expiration time of the item or null for no expiration |
||
122 | */ |
||
123 | public function getTimeExpire() |
||
129 | |||
130 | |||
131 | /** |
||
132 | * Sets the new expiration time of the item. |
||
133 | * |
||
134 | * @param string|null $timestamp Expiration time of the item |
||
135 | * @return \Aimeos\MAdmin\Cache\Item\Iface Cache item for chaining method calls |
||
136 | */ |
||
137 | public function setTimeExpire( $timestamp ) |
||
147 | |||
148 | |||
149 | /** |
||
150 | * Returns the tags associated to the item. |
||
151 | * |
||
152 | * @return array Tags associated to the item |
||
153 | */ |
||
154 | public function getTags() |
||
162 | |||
163 | |||
164 | /** |
||
165 | * Sets the new tags associated to the item. |
||
166 | * |
||
167 | * @param array Tags associated to the item |
||
168 | * @return \Aimeos\MAdmin\Cache\Item\Iface Cache item for chaining method calls |
||
169 | */ |
||
170 | public function setTags( array $tags ) |
||
177 | |||
178 | |||
179 | /** |
||
180 | * Returns the item type |
||
181 | * |
||
182 | * @return string Item type, subtypes are separated by slashes |
||
183 | */ |
||
184 | public function getResourceType() |
||
188 | |||
189 | |||
190 | /** |
||
191 | * Sets the item values from the given array. |
||
192 | * |
||
193 | * @param array $list Associative list of item keys and their values |
||
194 | * @return array Associative list of keys and their values that are unknown |
||
195 | */ |
||
196 | public function fromArray( array $list ) |
||
215 | |||
216 | |||
217 | /** |
||
218 | * Returns the item values as array. |
||
219 | * |
||
220 | * @param boolean True to return private properties, false for public only |
||
221 | * @return array Associative list of item properties and their values |
||
222 | */ |
||
223 | public function toArray( $private = false ) |
||
238 | } |
||
239 |