Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

where to instatiate another class when __construct is final in ORM

As I'm integrating Phalcons ORM into my Project, I'm not able to use the default workflow. The refactoring would cost me to much time.

One problem for me is, that __construct is final. I have my own eventhandler that needs to be instantiated when the model is created. Where can I instatiate my eventhandler, that it is guaranteed that every model instance has its own eventhandler?



5.8k
Accepted
answer

I found the onConstruct() method. Sorry...