Revert "merged branch drak/eventdispatcher_opimization (PR #2597)"
This reverts commitdb6fea9fd0
, reversing changes made to47b09f791b
.
This commit is contained in:
parent
db6fea9fd0
commit
6140869baa
@ -47,7 +47,7 @@ class EventDispatcher implements EventDispatcherInterface
|
||||
$event = new Event();
|
||||
}
|
||||
|
||||
$this->doDispatch($this->getListeners($eventName), $event);
|
||||
$this->doDispatch($this->getListeners($eventName), $eventName, $event);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -150,9 +150,10 @@ class EventDispatcher implements EventDispatcherInterface
|
||||
* for each listener.
|
||||
*
|
||||
* @param array[callback] $listeners The event listeners.
|
||||
* @param string $eventName The name of the event to dispatch.
|
||||
* @param Event $event The event object to pass to the event handlers/listeners.
|
||||
*/
|
||||
protected function doDispatch($listeners, Event $event)
|
||||
protected function doDispatch($listeners, $eventName, Event $event)
|
||||
{
|
||||
foreach ($listeners as $listener) {
|
||||
call_user_func($listener, $event);
|
||||
|
Reference in New Issue
Block a user