1 | <?php |
||
11 | abstract class AbstractAttributes extends AbstractBaseHtmlTagObject implements AttributesInterface |
||
12 | { |
||
13 | /** |
||
14 | * The attribute factory. |
||
15 | * |
||
16 | * @var \drupol\htmltag\Attribute\AttributeFactoryInterface |
||
17 | */ |
||
18 | private $attributeFactory; |
||
19 | /** |
||
20 | * Stores the attribute data. |
||
21 | * |
||
22 | * @var \drupol\htmltag\Attribute\AttributeInterface[] |
||
23 | */ |
||
24 | private $storage = []; |
||
25 | |||
26 | /** |
||
27 | * Attributes constructor. |
||
28 | * |
||
29 | * @param \drupol\htmltag\Attribute\AttributeFactoryInterface $attributeFactory |
||
30 | * The attribute factory |
||
31 | * @param mixed[] $data |
||
32 | * The input attributes |
||
33 | */ |
||
34 | 41 | public function __construct(AttributeFactoryInterface $attributeFactory, array $data = []) |
|
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | 1 | public function __toString() |
|
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | 16 | public function append($key, ...$values) |
|
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | 3 | public function contains($key, ...$values) |
|
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | 1 | public function count() |
|
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | 2 | public function delete(...$keys) |
|
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | 3 | public function exists($key, ...$values) |
|
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | 1 | public function getIterator() |
|
111 | |||
112 | /** |
||
113 | * {@inheritdoc} |
||
114 | */ |
||
115 | 30 | public function getStorage() |
|
119 | |||
120 | /** |
||
121 | * {@inheritdoc} |
||
122 | */ |
||
123 | 3 | public function getValuesAsArray() |
|
133 | |||
134 | /** |
||
135 | * {@inheritdoc} |
||
136 | */ |
||
137 | 41 | public function import($data) |
|
145 | |||
146 | /** |
||
147 | * {@inheritdoc} |
||
148 | */ |
||
149 | 1 | public function merge(array ...$dataset) |
|
159 | |||
160 | /** |
||
161 | * {@inheritdoc} |
||
162 | */ |
||
163 | 2 | public function offsetExists($key) |
|
167 | |||
168 | /** |
||
169 | * {@inheritdoc} |
||
170 | */ |
||
171 | 4 | public function offsetGet($key) |
|
179 | |||
180 | /** |
||
181 | * {@inheritdoc} |
||
182 | */ |
||
183 | 1 | public function offsetSet($key, $value = null) |
|
187 | |||
188 | /** |
||
189 | * {@inheritdoc} |
||
190 | */ |
||
191 | 1 | public function offsetUnset($key) |
|
195 | |||
196 | /** |
||
197 | * {@inheritdoc} |
||
198 | */ |
||
199 | 30 | public function preprocess(array $values, array $context = []) |
|
203 | |||
204 | /** |
||
205 | * {@inheritdoc} |
||
206 | */ |
||
207 | 2 | public function remove($key, ...$values) |
|
215 | |||
216 | /** |
||
217 | * {@inheritdoc} |
||
218 | */ |
||
219 | 24 | public function render() |
|
229 | |||
230 | /** |
||
231 | * {@inheritdoc} |
||
232 | */ |
||
233 | 1 | public function replace($key, $value, ...$replacements) |
|
243 | |||
244 | /** |
||
245 | * {@inheritdoc} |
||
246 | */ |
||
247 | 1 | public function serialize() |
|
253 | |||
254 | /** |
||
255 | * {@inheritdoc} |
||
256 | */ |
||
257 | 2 | public function set($key, ...$value) |
|
263 | |||
264 | /** |
||
265 | * {@inheritdoc} |
||
266 | */ |
||
267 | 1 | public function unserialize($serialized) |
|
280 | |||
281 | /** |
||
282 | * {@inheritdoc} |
||
283 | */ |
||
284 | 1 | public function without(...$keys) |
|
290 | } |
||
291 |