Not sure if im missing something obvious but I cant see it on the docs page for the mvc controller: https://docs.phalcon.io/en/latest/api/Phalcon_Mvc_Controller.html
In general when using the MVC Controller you use it for one entity. For example:
- UserController
- ArticleController
- etc..
So a controller usually handles 1 model. What I currently do is in my base controller I have a "getEntity()" method which checks for a "getModelName()" method in which I define what model the current controller is associated with.
That way in the getEntity() method I can then load the associated model based on the url "id" attribute. So inside any action in my controller I can use getEntity() to get the model I currently want to work with.
I want to move this down into the zephir MVC controller, anyone else interested in having this? Am I missing anything obvious as to why the MCV controller should not have this?