1 | <?php |
||
12 | class Attributes extends AbstractBaseHtmlTagObject implements AttributesInterface |
||
13 | { |
||
14 | /** |
||
15 | * Stores the attribute data. |
||
16 | * |
||
17 | * @var \drupol\htmltag\Attribute\AttributeInterface[] |
||
18 | */ |
||
19 | private $storage = []; |
||
20 | |||
21 | /** |
||
22 | * The attribute factory. |
||
23 | * |
||
24 | * @var \drupol\htmltag\Attribute\AttributeFactoryInterface |
||
25 | */ |
||
26 | private $attributeFactory; |
||
27 | |||
28 | /** |
||
29 | * Attributes constructor. |
||
30 | * |
||
31 | * @param \drupol\htmltag\Attribute\AttributeFactoryInterface $attributeFactory |
||
32 | * The attribute factory. |
||
33 | * @param mixed[] $attributes |
||
34 | * The input attributes. |
||
35 | 27 | */ |
|
36 | public function __construct(AttributeFactoryInterface $attributeFactory, $attributes = []) |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | 27 | */ |
|
45 | public function import($attributes) |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | 8 | */ |
|
57 | public function set($name, ...$value) |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | 2 | */ |
|
67 | public function offsetGet($name) |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | 1 | */ |
|
79 | public function offsetSet($name, $value = null) |
||
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | 1 | */ |
|
87 | public function offsetUnset($name) |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | 2 | */ |
|
95 | public function offsetExists($name) |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | 14 | */ |
|
103 | public function append($key, ...$value) |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | 2 | */ |
|
117 | public function remove($key, ...$value) |
||
125 | |||
126 | /** |
||
127 | * {@inheritdoc} |
||
128 | 2 | */ |
|
129 | public function delete(...$name) |
||
137 | |||
138 | /** |
||
139 | * {@inheritdoc} |
||
140 | 1 | */ |
|
141 | public function without(...$key) |
||
147 | |||
148 | /** |
||
149 | * {@inheritdoc} |
||
150 | 1 | */ |
|
151 | public function replace($key, $value, ...$replacement) |
||
165 | |||
166 | /** |
||
167 | * {@inheritdoc} |
||
168 | 1 | */ |
|
169 | public function merge(array $data = []) |
||
177 | |||
178 | /** |
||
179 | * {@inheritdoc} |
||
180 | 1 | */ |
|
181 | public function exists($key, $value = null) |
||
193 | |||
194 | /** |
||
195 | * {@inheritdoc} |
||
196 | 3 | */ |
|
197 | public function contains($key, ...$value) |
||
205 | |||
206 | /** |
||
207 | * {@inheritdoc} |
||
208 | 5 | */ |
|
209 | public function __toString() |
||
213 | |||
214 | /** |
||
215 | * {@inheritdoc} |
||
216 | 16 | */ |
|
217 | public function render() |
||
236 | 1 | ||
237 | /** |
||
238 | * {@inheritdoc} |
||
239 | */ |
||
240 | public function getStorage() |
||
244 | 1 | ||
245 | /** |
||
246 | * {@inheritdoc} |
||
247 | */ |
||
248 | public function getIterator() |
||
252 | 2 | ||
253 | /** |
||
254 | 2 | * {@inheritdoc} |
|
255 | 1 | */ |
|
256 | public function count() |
||
260 | |||
261 | /** |
||
262 | * {@inheritdoc} |
||
263 | */ |
||
264 | public function toArray() |
||
279 | |||
280 | 14 | /** |
|
281 | * {@inheritdoc} |
||
282 | 14 | */ |
|
283 | 14 | public function getValuesAsArray() |
|
292 | 14 | ||
293 | /** |
||
294 | * {@inheritdoc} |
||
295 | */ |
||
296 | protected function preprocess(array $values, $name = null) |
||
300 | } |
||
301 |