public function setPrefix($prefix)
    {
        $prefix = "/" . ltrim($prefix, "/");
        $routes = [];
        foreach ($this->routes as $route)
            $routes[] = $route->setPattern(rtrim($prefix . $route->getPattern(), "/"));
        $this->routes = $routes;
        return $this;
    }