Utils/StringUtils.php
/**
     * Convert a string with spaces or underscores to camelCase
     *
     * @param string $string
     * @param bool $firstToUpper
     * @return string
     */
Convert a string with spaces or underscores to camelCase
@param string $string
@param bool $firstToUpper
@return string
Convert a string with spaces or underscores to camelCase @param string $string @param bool $firstToUpper @return string
public static function camelize($string, $firstToUpper = false)
    {
        $string = 'x' . strtolower(trim(self::underscorize($string)));
        $string = ucwords(preg_replace('/[\s_-]+/', ' ', $string));
        $string = substr(str_replace(' ', '', $string), 1);
        return $firstToUpper ? ucfirst($string) : $string;
    }
public static function camelize ( $ string , $ firstToUpper = false ) { $ string = 'x' . strtolower ( trim ( self :: underscorize ( $ string ) ) ) ; $ string = ucwords ( preg_replace ( '/[\s_-]+/' , ' ' , $ string ) ) ; $ string = substr ( str_replace ( ' ' , '' , $ string ) , 1 ) ; return $ firstToUpper ? ucfirst ( $ string ) : $ string ; }
Convert a string with spaces or underscores to camelCase
 @param string $string
 @param bool $firstToUpper
 @return string
Convert a string with spaces or underscores to camelCase @param string $string @param bool $firstToUpper @return string