About Phalcon\Mvc\Model

I have a base model controller called Modelo. It has a protected static method search (it's just a refinated find()). I was creating to function to get his children caller class when I thought: "If I use another function that is also protected static, and from it call the original function, which model is used to do the find?".

And I discovered that it uses the base model controller. It is bad in terms of searching, or just doesn't mind which $model::find() is used? (for example, when searching users with Modelo::find()



83.4k

Maybe this has something to do with static binding? http://php.net/manual/en/language.oop5.late-static-bindings.php



18.5k

After reading, it would be, but I don't think so, because I tried doing self::find(...) for searching User in the base model controller Modelo, so I end with a Modelo::find(...) that searched an user...