code: 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;
      }
docs: Sets the router and parse its available routes if needed.
  
  @param  \Rougin\Slytherin\Routing\RouterInterface $router
  @return self