Format attribute name to access parameters or methods As option, if attribute name is found on camelizedAttributes array returns attribute name in camelcase format
string $attributeName:
string
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;
}