src/Application/Http/GenericRouter.php
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;
    }
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;
    }
Registers new route.

@param Route $route