1 | <?php |
||
10 | class Attribute extends AbstractBaseHtmlTagObject implements AttributeInterface |
||
11 | { |
||
12 | /** |
||
13 | * Store the attribute name. |
||
14 | * |
||
15 | * @var string|null |
||
16 | */ |
||
17 | private $name; |
||
18 | |||
19 | /** |
||
20 | * Store the attribute value. |
||
21 | * |
||
22 | * @var array|null |
||
23 | */ |
||
24 | private $values; |
||
25 | |||
26 | /** |
||
27 | * Attribute constructor. |
||
28 | * |
||
29 | * @param string $name |
||
30 | * The attribute name. |
||
31 | * @param string|string[]|mixed[] ...$values |
||
32 | * The attribute values. |
||
33 | */ |
||
34 | 42 | public function __construct($name, ...$values) |
|
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | 1 | public function offsetExists($offset) |
|
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 1 | public function offsetGet($offset) |
|
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 1 | public function offsetSet($offset, $value) |
|
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | 1 | public function offsetUnset($offset) |
|
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | 8 | public function set(...$value) |
|
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | 34 | public function getName() |
|
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | 10 | public function getValuesAsArray() |
|
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | 1 | public function getValuesAsString() |
|
119 | |||
120 | /** |
||
121 | * {@inheritdoc} |
||
122 | */ |
||
123 | 29 | public function render() |
|
134 | |||
135 | /** |
||
136 | * {@inheritdoc} |
||
137 | */ |
||
138 | 1 | public function __toString() |
|
142 | |||
143 | /** |
||
144 | * {@inheritdoc} |
||
145 | */ |
||
146 | 1 | public function isBoolean() |
|
150 | |||
151 | /** |
||
152 | * {@inheritdoc} |
||
153 | */ |
||
154 | 29 | public function append(...$value) |
|
160 | |||
161 | /** |
||
162 | * {@inheritdoc} |
||
163 | */ |
||
164 | 5 | public function remove(...$value) |
|
173 | |||
174 | /** |
||
175 | * {@inheritdoc} |
||
176 | */ |
||
177 | 2 | public function replace($original, ...$replacement) |
|
189 | |||
190 | /** |
||
191 | * {@inheritdoc} |
||
192 | */ |
||
193 | 5 | public function contains(...$substring) |
|
208 | |||
209 | /** |
||
210 | * {@inheritdoc} |
||
211 | */ |
||
212 | 2 | public function setBoolean($boolean = true) |
|
218 | |||
219 | /** |
||
220 | * {@inheritdoc} |
||
221 | */ |
||
222 | 1 | public function delete() |
|
229 | |||
230 | /** |
||
231 | * {@inheritdoc} |
||
232 | */ |
||
233 | 1 | public function alter(callable ...$closures) |
|
246 | |||
247 | /** |
||
248 | * {@inheritdoc} |
||
249 | */ |
||
250 | 1 | public function serialize() |
|
257 | |||
258 | /** |
||
259 | * {@inheritdoc} |
||
260 | */ |
||
261 | 1 | public function unserialize($serialized) |
|
268 | |||
269 | /** |
||
270 | * {@inheritdoc} |
||
271 | */ |
||
272 | 42 | protected function escape($value) |
|
276 | } |
||
277 |