public static function camelize($string, $separator = null, $preserveWhiteSpace = false, $isKey = false)
    {
        empty($separator) && $separator = ['_', '-'];

        $_newString = ucwords(str_replace($separator, ' ', $string));

        if (false !== $isKey) {
            $_newString = lcfirst($_newString);
        }

        return (false === $preserveWhiteSpace ? str_replace(' ', null, $_newString) : $_newString);
    }
public static function camelize($string, $separator = null, $preserveWhiteSpace = false, $isKey = false)
    {
        empty($separator) && $separator = ['_', '-'];

        $_newString = ucwords(str_replace($separator, ' ', $string));

        if (false !== $isKey) {
            $_newString = lcfirst($_newString);
        }

        return (false === $preserveWhiteSpace ? str_replace(' ', null, $_newString) : $_newString);
    }
public static function camelize ( $ string , $ separator = null , $ preserveWhiteSpace = false , $ isKey = false ) { empty ( $ separator ) && $ separator = [ '_' , '-' ] ; $ _newString = ucwords ( str_replace ( $ separator , ' ' , $ string ) ) ; if ( false !== $ isKey ) { $ _newString = lcfirst ( $ _newString ) ; } return ( false === $ preserveWhiteSpace ? str_replace ( ' ' , null , $ _newString ) : $ _newString ) ; }
Converts a separator delimited string to camel case

@param string  $string
@param string  $separator
@param boolean $preserveWhiteSpace
@param bool    $isKey If true, first word is lower-cased

@return string
Converts a separator delimited string to camel case