src/Routing/FastRouteDispatcher.php
public function router(RouterInterface $router)
    {
        $routes = $router->routes();

        $this->router = $router;

        $generator = new \FastRoute\DataGenerator\GroupCountBased;

        $routes($router = new RouteCollector(new Std, $generator));

        $this->dispatcher = new GroupCountBased($router->getData());

        return $this;
    }
public function router(RouterInterface $router)
    {
        $routes = $router->routes();

        $this->router = $router;

        $generator = new \FastRoute\DataGenerator\GroupCountBased;

        $routes($router = new RouteCollector(new Std, $generator));

        $this->dispatcher = new GroupCountBased($router->getData());

        return $this;
    }
public function router ( RouterInterface $ router ) { $ routes = $ router -> routes ( ) ; $ this -> router = $ router ; $ generator = new \ FastRoute \ DataGenerator \ GroupCountBased ; $ routes ( $ router = new RouteCollector ( new Std , $ generator ) ) ; $ this -> dispatcher = new GroupCountBased ( $ router -> getData ( ) ) ; return $ this ; }
Sets the router and parse its available routes if needed.

@param  \Rougin\Slytherin\Routing\RouterInterface $router
@return self
Sets the router and parse its available routes if needed .