1 | <?php |
||
7 | class Attributes |
||
8 | { |
||
9 | protected $list; |
||
10 | |||
11 | /** |
||
12 | * @param array $attributes |
||
13 | */ |
||
14 | 24 | function __construct(array $attributes) |
|
18 | |||
19 | /** |
||
20 | * @param string $name |
||
21 | * @param mixed $default |
||
22 | * @return mixed |
||
23 | */ |
||
24 | 4 | public function get($name, $default = null) |
|
28 | |||
29 | /** |
||
30 | * @param array $attributes |
||
31 | * @return $this |
||
32 | */ |
||
33 | 2 | public function set(array $attributes) |
|
39 | |||
40 | /** |
||
41 | * @return array |
||
42 | */ |
||
43 | 8 | public function all() |
|
47 | |||
48 | /** |
||
49 | * @param string $name |
||
50 | * @return bool |
||
51 | */ |
||
52 | 1 | public function has($name) |
|
56 | |||
57 | /** |
||
58 | * @param string $name |
||
59 | */ |
||
60 | 1 | public function forget($name) |
|
64 | |||
65 | /** |
||
66 | * @param array $attributes |
||
67 | * @return $this |
||
68 | */ |
||
69 | 2 | public function push(array $attributes) |
|
75 | |||
76 | /** |
||
77 | * @param string $name |
||
78 | * @param mixed $value |
||
79 | * @return $this |
||
80 | */ |
||
81 | 1 | public function put($name, $value) |
|
87 | |||
88 | /** |
||
89 | * @param array $attributes |
||
90 | * @return $this |
||
91 | */ |
||
92 | 1 | public function merge(array $attributes) |
|
98 | |||
99 | /** |
||
100 | * @return array|bool |
||
101 | */ |
||
102 | 6 | public static function mergeArrayValues() |
|
129 | |||
130 | /** |
||
131 | * @param string $valueOne |
||
132 | * @param string $valueTwo |
||
133 | * @return string |
||
134 | */ |
||
135 | 4 | protected static function mergeValues($valueOne, $valueTwo) |
|
148 | |||
149 | /** |
||
150 | * @param array $attributes |
||
151 | * @return string |
||
152 | */ |
||
153 | 4 | public function build($attributes = []) |
|
165 | |||
166 | /** |
||
167 | * @return string |
||
168 | */ |
||
169 | 1 | function __toString() |
|
173 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.