You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why Event handlers must be objects (ie. Closures)? It should be perfectly fine if event handlers would also be a callable as one of your comments says:
/** * Attach a listener to the events manager * * @param string eventType * @param object|callable handler * @param int priority */publicfunction attach(string! eventType, var handler, int! priority = 100)
{
...
}
Yet the first check in the function is:
if typeof handler != "object" {
thrownewException("Event handler must be an Object");
}
Details
Phalcon version: 3.2.4 (but it is present in master branch at this moment as well)
PHP Version: 7.0.0
Operating System: Windows
Installation type: From release page
Server: Nginx and Apache
The text was updated successfully, but these errors were encountered:
https://github.com/phalcon/cphalcon/blob/master/phalcon/events/manager.zep
Why Event handlers must be objects (ie. Closures)? It should be perfectly fine if event handlers would also be a callable as one of your comments says:
Yet the first check in the function is:
Details
The text was updated successfully, but these errors were encountered: