public function getRouter()
    {
        if (!isset($this->router)) {
            $container = clone $this->getContainer();
            $container->delegate(new ReflectionContainer);
            $this->router = (new RouteCollection($container));
        }

        /** @var RouteCollection $router */
        $router = $this->validateContract($this->router, RouteCollection::class);
        return $router;
    }
public function getRouter()
    {
        if (!isset($this->router)) {
            $container = clone $this->getContainer();
            $container->delegate(new ReflectionContainer);
            $this->router = (new RouteCollection($container));
        }

        /** @var RouteCollection $router */
        $router = $this->validateContract($this->router, RouteCollection::class);
        return $router;
    }
public function getRouter ( ) { if ( ! isset ( $ this -> router ) ) { $ container = clone $ this -> getContainer ( ) ; $ container -> delegate ( new ReflectionContainer ) ; $ this -> router = ( new RouteCollection ( $ container ) ) ; } /** @var RouteCollection $router */ $ router = $ this -> validateContract ( $ this -> router , RouteCollection :: class ) ; return $ router ; }
Return the router.

@return \League\Route\RouteCollection
Return the router .