public function add(Route $route): void
    {
        if ($route instanceof Route) {
            $name = $route->getName();
        } else {
            $name = Route::generateNameFromPath($route->getPath());
        }

        $baseRoute = new SymfonyRoute($route->getPath());
        $baseRoute->setMethods($route->getMethods());

        $this->routeCollection->add($name, $baseRoute);
        $this->routes[$name] = $route;
    }