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) |
||
41 | |||
42 | /** |
||
43 | * @param string $attribute |
||
44 | * @param string $value |
||
45 | * |
||
46 | * @return $this |
||
47 | */ |
||
48 | public function setAttribute(string $attribute, string $value = '') |
||
60 | |||
61 | /** |
||
62 | * @param string|array $class |
||
63 | * |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function addClass($class) |
||
78 | |||
79 | /** |
||
80 | * @param \Spatie\Menu\Html\Attributes $attributes |
||
81 | * |
||
82 | * @return $this |
||
83 | */ |
||
84 | public function mergeWith(self $attributes) |
||
91 | |||
92 | public function isEmpty(): bool |
||
96 | |||
97 | public function toArray(): array |
||
105 | |||
106 | public function toString(): string |
||
125 | |||
126 | public function __toString(): string |
||
130 | } |
||
131 |