1 | <?php |
||
10 | class HtmlClassHelper |
||
11 | { |
||
12 | /** |
||
13 | * Builds a string of CSS class names based on supplied predicates. |
||
14 | * |
||
15 | * @param array ...$config |
||
16 | * @return string |
||
17 | */ |
||
18 | 12 | public static function getClasses(...$config) |
|
28 | |||
29 | /** |
||
30 | * Helper function that determines whether the supplied classes should |
||
31 | * be added, according to the supplied argument. |
||
32 | * |
||
33 | * @param array $classes |
||
34 | * @param string|array $argument |
||
35 | * @return array |
||
36 | */ |
||
37 | 12 | private static function addArgumentToClasses($classes, $argument) |
|
65 | |||
66 | |||
67 | /** |
||
68 | * Determines whether an array has string keys. |
||
69 | * |
||
70 | * @param array $array |
||
71 | * @return bool |
||
72 | */ |
||
73 | 9 | private static function hasStringKeys($array) |
|
82 | } |
||
83 |