/** * @param string $verb * @param Route $route * @param string $name * @return Route */ public function map($verb, Route $route, $name = null) { $route->allow($verb); if ($this->prefix !== '/') { $route->prefix($this->prefix); } if ($name == null) { $this->routes[] = $route; } else { $this->routes[$name] = $route; } return $route; }