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