public function register(ContainerInterface $container)
    {
        if (! isset($container['session'])) {
            $container['session'] = function (ContainerInterface $container) {
                return new Session;
            };
        }

        if (! isset($container['router'])) {
            /**
             * This service MUST return a SHARED instance
             * of Mbh\Interfaces\RouterInterface.
             *
             * @param Container $container
             * @return RouterInterface
             */
            $container['router'] = function (ContainerInterface $container) {
                $routerCacheFile = false;
                if (isset($container->get('settings')['routerCacheFile'])) {
                    $routerCacheFile = $container->get('settings')['routerCacheFile'];
                }

                $router = (new Router)->setCacheFile($routerCacheFile);
                if (method_exists($router, 'setContainer')) {
                    $router->setContainer($container);
                }

                if (method_exists($router, 'setCallableResolver')) {
                    $router->setCallableResolver($container['callableResolver']);
                }

                return $router;
            };
        }
    }