1 | <?php |
||
18 | class CompoundWordConvertor |
||
19 | { |
||
20 | /** |
||
21 | * Check if a string is camelCase |
||
22 | * |
||
23 | * @param string $item |
||
24 | * @return bool |
||
25 | 5 | */ |
|
26 | public static function isCamelCase($item) |
||
32 | |||
33 | /** |
||
34 | * Convert to camelCase |
||
35 | 10 | * |
|
36 | * @param $word |
||
37 | * @return string |
||
38 | 10 | */ |
|
39 | 10 | public static function convertToCamelCase($word) |
|
43 | |||
44 | /** |
||
45 | * Convert any string to PascalCase |
||
46 | * @param string $word |
||
47 | * @return string |
||
48 | */ |
||
49 | 4 | public static function convertToPascalCase($word) |
|
61 | |||
62 | /** |
||
63 | * Convert any string to underscore_string (snake_case) |
||
64 | * @param string $word |
||
65 | * @return string |
||
66 | */ |
||
67 | public static function convertToSnakeCase($word) |
||
79 | } |
||
80 |