Revert "merged branch drak/eventdispatcher_opimization (PR #2597)"

This reverts commit db6fea9fd0, reversing
changes made to 47b09f791b.
This commit is contained in:
Fabien Potencier 2011-11-11 16:28:23 +01:00
parent db6fea9fd0
commit 6140869baa

View File

@ -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);