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 | 44 | 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 | 31 | public function getStorage() |
|
119 | |||
120 | /** |
||
121 | * {@inheritdoc} |
||
122 | */ |
||
123 | 3 | public function getValuesAsArray() |
|
133 | |||
134 | /** |
||
135 | * {@inheritdoc} |
||
136 | */ |
||
137 | 44 | 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 | 2 | public function remove($key, ...$values) |
|
207 | |||
208 | /** |
||
209 | * {@inheritdoc} |
||
210 | */ |
||
211 | 25 | public function render() |
|
221 | |||
222 | /** |
||
223 | * {@inheritdoc} |
||
224 | */ |
||
225 | 1 | public function replace($key, $value, ...$replacements) |
|
235 | |||
236 | /** |
||
237 | * {@inheritdoc} |
||
238 | */ |
||
239 | 1 | public function serialize() |
|
245 | |||
246 | /** |
||
247 | * {@inheritdoc} |
||
248 | */ |
||
249 | 2 | public function set($key, ...$value) |
|
255 | |||
256 | /** |
||
257 | * {@inheritdoc} |
||
258 | */ |
||
259 | 1 | public function unserialize($serialized) |
|
272 | |||
273 | /** |
||
274 | * {@inheritdoc} |
||
275 | */ |
||
276 | 1 | public function without(...$keys) |
|
282 | |||
283 | /** |
||
284 | * {@inheritdoc} |
||
285 | */ |
||
286 | 1 | protected function escape($value) |
|
290 | } |
||
291 |