1 | <?php namespace Arcanedev\LaravelHtml\Helpers; |
||
9 | class Attributes |
||
10 | { |
||
11 | /* ----------------------------------------------------------------- |
||
12 | | Main Methods |
||
13 | | ----------------------------------------------------------------- |
||
14 | */ |
||
15 | |||
16 | /** |
||
17 | * Build an HTML attribute string from an array. |
||
18 | * |
||
19 | * @param array $attributes |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | 384 | public static function make(array $attributes) |
|
36 | |||
37 | /* ----------------------------------------------------------------- |
||
38 | | Other Methods |
||
39 | | ----------------------------------------------------------------- |
||
40 | */ |
||
41 | |||
42 | /** |
||
43 | * Make attribute element. |
||
44 | * |
||
45 | * @param mixed $key |
||
46 | * @param mixed $value |
||
47 | * |
||
48 | * @return null|string |
||
49 | */ |
||
50 | 348 | private static function makeAttributeElement($key, $value) |
|
66 | } |
||
67 |
Let’s assume you have a class which uses late-static binding:
}
The code above will run fine in your PHP runtime. However, if you now create a sub-class and call the
getSomeVariable()
on that sub-class, you will receive a runtime error:In the case above, it makes sense to update
SomeClass
to useself
instead: