private function underscoreToCamelCase($string, $firstCharCaps = false)
    {
        if ($firstCharCaps == true) {
            $string[0] = strtoupper($string[0]);
        }

        $func = create_function('$c', 'return strtoupper($c[1]);');

        return preg_replace_callback('/_([a-z])/', $func, $string);
    }
private function underscoreToCamelCase($string, $firstCharCaps = false)
    {
        if ($firstCharCaps == true) {
            $string[0] = strtoupper($string[0]);
        }

        $func = create_function('$c', 'return strtoupper($c[1]);');

        return preg_replace_callback('/_([a-z])/', $func, $string);
    }
private function underscoreToCamelCase ( $ string , $ firstCharCaps = false ) { if ( $ firstCharCaps == true ) { $ string [ 0 ] = strtoupper ( $ string [ 0 ] ) ; } $ func = create_function ( '$c' , 'return strtoupper($c[1]);' ) ; return preg_replace_callback ( '/_([a-z])/' , $ func , $ string ) ; }
Convert strings with underscores into CamelCase.

@param $string
@param bool $firstCharCaps

@return mixed
Convert strings with underscores into CamelCase .