protected function formatAttribute($attributeName)
    {
        if (in_array($attributeName, $this->camelizedAttributes)) {
            return preg_replace_callback(
                '/(^|_|\.)+(.)/', function ($match) {
                    return ('.' === $match[1] ? '_' : '').strtoupper($match[2]);
                }, $attributeName
            );
        }

        return $attributeName;
    }
protected function formatAttribute($attributeName)
    {
        if (in_array($attributeName, $this->camelizedAttributes)) {
            return preg_replace_callback(
                '/(^|_|\.)+(.)/', function ($match) {
                    return ('.' === $match[1] ? '_' : '').strtoupper($match[2]);
                }, $attributeName
            );
        }

        return $attributeName;
    }
protected function formatAttribute ( $ attributeName ) { if ( in_array ( $ attributeName , $ this -> camelizedAttributes ) ) { return preg_replace_callback ( '/(^|_|\.)+(.)/' , function ( $ match ) { return ( '.' === $ match [ 1 ] ? '_' : '' ) . strtoupper ( $ match [ 2 ] ) ; } , $ attributeName ) ; } return $ attributeName ; }
Format attribute name to access parameters or methods
As option, if attribute name is found on camelizedAttributes array
returns attribute name in camelcase format

@param string $attributeName
@return string
Format attribute name to access parameters or methods As option if attribute name is found on camelizedAttributes array returns attribute name in camelcase format