public function map($routeUrl, $target = '', array $args = array()) { $route = new Route(); $route->setUrl($this->basePath . $routeUrl); $route->setTarget($target); if (isset($args['methods'])) { $methods = explode(',', $args['methods']); $route->setMethods($methods); } if (isset($args['filters'])) { $route->setFilters($args['filters']); } if (isset($args['name'])) { $route->setName($args['name']); if (!isset($this->namedRoutes[$route->getName()])) { $this->namedRoutes[$route->getName()] = $route; } } $this->routes[] = $route; }