public function initRouterDi()
    {
        $config = $this->getConfig();
        if (!isset($config['router'])) {
            throw new Exception\RuntimeException('Cannot init DI for router. Cannot find router configuration');
        }
        $config = $config['router']->toArray();
        $router = new Router($this->diFactory);
        foreach ($config as $name => $routeInfo) {
            $router->addRoute($name, $routeInfo);
        }

        $this->diFactory->set('router', $router, true);

        return $this;
    }