original_string: public function merge(self $router) {
          if ($this->running) {
              throw new \Error("Cannot merge routers after the server has started");
          }
  
          foreach ($router->routes as $route) {
              $route[1] = \ltrim($router->prefix, "/") . $route[1];
              $route[2] = Middleware\stack($route[2], ...$router->middlewares);
              $this->routes[] = $route;
          }
  
          $this->observers->addAll($router->observers);
      }
code: public function merge(self $router) {
          if ($this->running) {
              throw new \Error("Cannot merge routers after the server has started");
          }
  
          foreach ($router->routes as $route) {
              $route[1] = \ltrim($router->prefix, "/") . $route[1];
              $route[2] = Middleware\stack($route[2], ...$router->middlewares);
              $this->routes[] = $route;
          }
  
          $this->observers->addAll($router->observers);
      }
code_tokens: public function merge ( self $ router ) { if ( $ this -> running ) { throw new \ Error ( "Cannot merge routers after the server has started" ) ; } foreach ( $ router -> routes as $ route ) { $ route [ 1 ] = \ ltrim ( $ router -> prefix , "/" ) . $ route [ 1 ] ; $ route [ 2 ] = Middleware \ stack ( $ route [ 2 ] , ... $ router -> middlewares ) ; $ this -> routes [ ] = $ route ; } $ this -> observers -> addAll ( $ router -> observers ) ; }
docstring: Merge another router's routes into this router.
  
  Doing so might improve performance for request dispatching.
  
  @param self $router Router to merge.
docstring_tokens: Merge another router s routes into this router .