FooBar
model is mapped to foo_bar
table. But I don't follow this this convention. The name of my tables are the lowercase of Model names. I tried to create a base class for moldels as follows:
class BaseModel extends Phalcon\Mvc\Model
{
public function getSource()
{
return strtolower(get_class());
}
}
But this does not work because get_class()
return thne name of parent class (BaseModle
) for all extended models. What is the correct solution?