Skip to content

Commit

Permalink
[Routing] added a warning about UrlMatcher::getAttributes()
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Dec 3, 2012
1 parent d378cab commit 8af010a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/Symfony/Component/Routing/Matcher/UrlMatcher.php
Expand Up @@ -162,17 +162,22 @@ protected function matchCollection($pathinfo, RouteCollection $routes)
}

/**
* Returns an array of values to use as request attributes
* Returns an array of values to use as request attributes.
*
* @param Route $route The route we are matching against
* @param string $name The name of the route
* @param array $attributes An array of attributes from the matcher
* As this method requires the Route object, it is not available
* in matchers that do not have access to the matched Route instance
* (like the PHP and Apache matcher dumpers).
*
* @param Route $route The route we are matching against
* @param string $name The name of the route
* @param array $attributes An array of attributes from the matcher
*
* @return array An array of parameters
*/
protected function getAttributes(Route $route, $name, array $attributes)
{
$attributes['_route'] = $name;

return $this->mergeDefaults($attributes, $route->getDefaults());
}

Expand Down

0 comments on commit 8af010a

Please sign in to comment.