Phosphorum\Bootstrap::initDispatcher PHP Method

initDispatcher() protected method

Initialize the Dispatcher.
protected initDispatcher ( )
    protected function initDispatcher()
    {
        $this->di->setShared('dispatcher', function () {
            /** @var DiInterface $this */
            $em = $this->getShared('eventsManager');
            $dispatcher = new Dispatcher();
            $dispatcher->setDefaultNamespace('Phosphorum\\Controllers');
            $dispatcher->setEventsManager($em);
            return $dispatcher;
        });
    }