1
Development and Code Review / Re: Registering callbacks on controller actions?
« on: August 27, 2018, 02:00:29 am »
After taking a look at what is required to register a global callback I don't believe it is possible to do from the context of a Plugin - which logically makes good sense.
That said, my own experience is with other frameworks and I'm not expert with Phalcon so there may be an approach buried away that is not clear, perhaps as a Dependency Injection but even then it would not seem possible without adding code to the core.
If anyone knows of an approach to attach a callback to the core from a plugin please do post herewith - while it does not seem like it should be possible it would be good to know if it is.
That said, my own experience is with other frameworks and I'm not expert with Phalcon so there may be an approach buried away that is not clear, perhaps as a Dependency Injection but even then it would not seem possible without adding code to the core.
If anyone knows of an approach to attach a callback to the core from a plugin please do post herewith - while it does not seem like it should be possible it would be good to know if it is.