src/Library/Helper/Text.php
public static function toCamelCase($name = '', $replace = '_', $capitalize_first_char = true)
    {
        if (empty($name)) {
            return '';
        }
        if ($capitalize_first_char) {
            $name[0] = strtoupper($name[0]);
        }
        $func = create_function('$c', 'return strtoupper($c[1]);');
        return trim(preg_replace_callback('#'.$replace.'([a-z])#', $func, $name), $replace);
    }
public static function toCamelCase($name = '', $replace = '_', $capitalize_first_char = true)
    {
        if (empty($name)) {
            return '';
        }
        if ($capitalize_first_char) {
            $name[0] = strtoupper($name[0]);
        }
        $func = create_function('$c', 'return strtoupper($c[1]);');
        return trim(preg_replace_callback('#'.$replace.'([a-z])#', $func, $name), $replace);
    }
public static function toCamelCase ( $ name = '' , $ replace = '_' , $ capitalize_first_char = true ) { if ( empty ( $ name ) ) { return '' ; } if ( $ capitalize_first_char ) { $ name [ 0 ] = strtoupper ( $ name [ 0 ] ) ; } $ func = create_function ( '$c' , 'return strtoupper($c[1]);' ) ; return trim ( preg_replace_callback ( '#' . $ replace . '([a-z])#' , $ func , $ name ) , $ replace ) ; }
Transform a name in CamelCase

@param   string  $name       The string to transform
@param   string  $replace    Replacement character
@param   bool    $capitalize_first_char May the first letter be in upper case (default is `true`)
@return  string The CamelCase version of `$name`
Transform a name in CamelCase