Hello!
I'm using lower_case for table column naming, but i want to use camelCase inside my PHP scripts.
I wrote this in an own Model which extends \Phalcon\Mvc\Model:
public function columnMap()
{
$columns = $this->getModelsMetaData()->getAttributes($this);
$map = [];
foreach ($columns as $column) $map[$column] = lcfirst(\Phalcon\Text::camelize($column));
return $map;
}
It works, but does Phalcon cache column mapping? Or is there a better way to do this?