/** * Generates the path portion of a URL for a route * * @param ParsedRoute $route The route whose URL we're generating * @param mixed|array $values The value or list of values to fill the route with * @return string The generated path value * @throws URLException Thrown if the generated path is not valid */ private function generatePath(ParsedRoute $route, &$values) { return $this->generateUrlPart($route->getRawPath(), $route->getPathRegex(), $route->getName(), $values); }
/** * Adds a route to the collection * * @param ParsedRoute $route The route to add */ public function add(ParsedRoute $route) { foreach ($route->getMethods() as $method) { $this->routes[$method][] = $route; if (!empty($route->getName())) { $this->namedRoutes[$route->getName()] =& $route; } } }