protected function getEventDispatcher(IContainer $container) : IEventDispatcher
    {
        $eventRegistry = new EventRegistry();

        foreach ($this->getEventListenerConfig() as $eventName => $listeners) {
            foreach ((array)$listeners as $listener) {
                $eventRegistry->registerListener($eventName, $this->getEventListenerCallback($listener, $container));
            }
        }

        return new SynchronousEventDispatcher($eventRegistry);
    }
protected function getEventDispatcher(IContainer $container) : IEventDispatcher
    {
        $eventRegistry = new EventRegistry();

        foreach ($this->getEventListenerConfig() as $eventName => $listeners) {
            foreach ((array)$listeners as $listener) {
                $eventRegistry->registerListener($eventName, $this->getEventListenerCallback($listener, $container));
            }
        }

        return new SynchronousEventDispatcher($eventRegistry);
    }
protected function getEventDispatcher ( IContainer $ container ) : IEventDispatcher { $ eventRegistry = new EventRegistry ( ) ; foreach ( $ this -> getEventListenerConfig ( ) as $ eventName => $ listeners ) { foreach ( ( array ) $ listeners as $ listener ) { $ eventRegistry -> registerListener ( $ eventName , $ this -> getEventListenerCallback ( $ listener , $ container ) ) ; } } return new SynchronousEventDispatcher ( $ eventRegistry ) ; }
Gets the event dispatcher

@param IContainer $container The IoC container
@return IEventDispatcher The event dispatcher
Gets the event dispatcher