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 | 41 | 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 | 33 | public function getName() |
|
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | 33 | public function getValuesAsArray() |
|
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | 29 | public function render() |
|
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | 1 | public function __toString() |
|
118 | |||
119 | /** |
||
120 | * {@inheritdoc} |
||
121 | */ |
||
122 | 1 | public function isBoolean() |
|
126 | |||
127 | /** |
||
128 | * {@inheritdoc} |
||
129 | */ |
||
130 | 28 | public function append(...$value) |
|
136 | |||
137 | /** |
||
138 | * {@inheritdoc} |
||
139 | */ |
||
140 | 5 | public function remove(...$value) |
|
149 | |||
150 | /** |
||
151 | * {@inheritdoc} |
||
152 | */ |
||
153 | 2 | public function replace($original, ...$replacement) |
|
165 | |||
166 | /** |
||
167 | * {@inheritdoc} |
||
168 | */ |
||
169 | 5 | public function contains(...$substring) |
|
184 | |||
185 | /** |
||
186 | * {@inheritdoc} |
||
187 | */ |
||
188 | 2 | public function setBoolean($boolean = true) |
|
194 | |||
195 | /** |
||
196 | * {@inheritdoc} |
||
197 | */ |
||
198 | 1 | public function delete() |
|
205 | |||
206 | /** |
||
207 | * {@inheritdoc} |
||
208 | */ |
||
209 | 1 | public function alter(callable ...$closures) |
|
222 | |||
223 | /** |
||
224 | * {@inheritdoc} |
||
225 | */ |
||
226 | 1 | public function serialize() |
|
233 | |||
234 | /** |
||
235 | * {@inheritdoc} |
||
236 | */ |
||
237 | 1 | public function unserialize($serialized) |
|
244 | } |
||
245 |