I have an abstract class (well it should be, but right now it's a public class), Widget - there are many types of widget (WidgetOne, WidgetTwo etc.) that necesitate multiple models in Phalcon, there's quite a lot of commanality hence the abstract class.
So far, not a probem. The problem comes with working with the ORM - I can call:
(hence not going with abstract in reality) which returns me all the widgets I want, but they are all obviously of type Widget, not what they are in reality, WidgetOne, WidgetTwo etc.
As far as I can see Phalcon has no way of handling this.
Does anyone have a PHP implementation of Phalcon\Mvc\Model::find() ? If I had that then my Widget model can provide it's own find, findFirst etc. as the Widget table has a field: type which I can use to get the actual Widget subclass from.