1 | <?php |
||
4 | class NameUtils { |
||
5 | |||
6 | /** |
||
7 | * Transforms a given input into StudlyCase |
||
8 | * |
||
9 | * @param string $input |
||
10 | * @return string |
||
11 | */ |
||
12 | public static function toStudlyCase($input) { |
||
18 | |||
19 | /** |
||
20 | * Transforms a given input into camelCase |
||
21 | * |
||
22 | * @param string $input |
||
23 | * @return string |
||
24 | */ |
||
25 | public static function toCamelCase($input) { |
||
28 | |||
29 | /** |
||
30 | * Transforms a given input into kebap-case |
||
31 | * |
||
32 | * @param string $input |
||
33 | * @return string |
||
34 | */ |
||
35 | public static function toKebapCase($input) { |
||
38 | |||
39 | /** |
||
40 | * Transforms a given input into snake_case |
||
41 | * |
||
42 | * @param string $input |
||
43 | * @return string |
||
44 | */ |
||
45 | public static function toSnakeCase($input) { |
||
48 | |||
49 | private static function dasherize($input) { |
||
58 | |||
59 | /** |
||
60 | * Returns the plural form of the input |
||
61 | * |
||
62 | * @param string $input |
||
63 | * @return string |
||
64 | */ |
||
65 | public static function pluralize($input) { |
||
72 | |||
73 | /** |
||
74 | * Returns the singular form of the input |
||
75 | * |
||
76 | * @param string $input |
||
77 | * @return string |
||
78 | */ |
||
79 | public static function singularize($input) { |
||
86 | } |