code: public function router(RouterInterface $router)
      {
          foreach (array_filter($router->routes()) as $route) {
              preg_match_all('/:[a-z]*/', $route[1], $parameters);
  
              $route[4] = str_replace($parameters[0], '(\w+)', $route[1]);
              $route[4] = '/^' . str_replace('/', '\/', $route[4]) . '$/';
  
              $route[5] = array_map(function ($item) {
                  return str_replace(':', '', $item);
              }, $parameters[0]);
  
              $this->routes[] = $route;
          }
  
          return $this;
      }
docs: Sets the router and parse its available routes if needed.
  
  @param  \Rougin\Slytherin\Routing\RouterInterface $router
  @return self