1 | <?php |
||
5 | class Attributes |
||
6 | { |
||
7 | /** @var array */ |
||
8 | protected $attributes = []; |
||
9 | |||
10 | /** @var array */ |
||
11 | protected $classes = []; |
||
12 | |||
13 | public function __construct(array $attributes = []) |
||
17 | |||
18 | /** |
||
19 | * @param array $attributes |
||
20 | * |
||
21 | * @return $this |
||
22 | */ |
||
23 | public function setAttributes(array $attributes) |
||
42 | |||
43 | /** |
||
44 | * @param string $attribute |
||
45 | * @param string $value |
||
46 | * |
||
47 | * @return $this |
||
48 | */ |
||
49 | public function setAttribute(string $attribute, string $value = '') |
||
61 | |||
62 | /** |
||
63 | * @param string|array $class |
||
64 | * |
||
65 | * @return $this |
||
66 | */ |
||
67 | public function addClass($class) |
||
79 | |||
80 | public function isEmpty() : bool |
||
84 | |||
85 | public function toArray() : array |
||
93 | |||
94 | public function toString() : string |
||
114 | |||
115 | public function __toString() : string |
||
119 | } |
||
120 |