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.

Is there way to execute my function after reading object's data from DB but before creating object?

Hello.

My question is: Is there way to execute my function after reading object's data from DB but before creating object?

For ex, in \Phalcon\MVC\Model there are events: beforeCreate(), beforeUpdate(), beforeDelete()... but is there an event beforeRead() or something like that?



8.5k
Accepted
answer

if I understand correctly, you should use afterFetch(); but it works only for 1 object. not array objects.



26.2k

Thank you, for the answer. Now, I found it in the docs... probably in the docs for the 0.8 release (when I read it) there was not description of the such feature.