| 1 | <?php |
||
| 9 | class Helper |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Convert a string to camelCase. Strings already in camelCase will not be harmed. |
||
| 14 | * |
||
| 15 | * @param string $str The input string |
||
| 16 | * |
||
| 17 | * @return string camelCased output string |
||
| 18 | */ |
||
| 19 | public static function camelCase($str) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param $obj |
||
| 34 | * |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | public static function objectToArray($obj) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Convert strings with underscores to be all lowercase before camelCase is preformed. |
||
| 56 | * |
||
| 57 | * @param string $str The input string |
||
| 58 | * |
||
| 59 | * @return string The output string |
||
| 60 | */ |
||
| 61 | protected static function convertToLowercase($str) |
||
| 75 | } |
||
| 76 |