protected function UrlMatcher::getAttributes

Same name in this branch
  1. 8.x drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php \Symfony\Component\Routing\Matcher\UrlMatcher::getAttributes()
  2. 8.x drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/NestedMatcher/UrlMatcher.php \Symfony\Cmf\Component\Routing\NestedMatcher\UrlMatcher::getAttributes()

Returns an array of values to use as request attributes.

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).

Parameters

Route $route The route we are matching against:

string $name The name of the route:

array $attributes An array of attributes from the matcher:

Return value

array An array of parameters

1 call to UrlMatcher::getAttributes()
UrlMatcher::matchCollection in drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php
Tries to match a URL with a set of routes.
1 method overrides UrlMatcher::getAttributes()
UrlMatcher::getAttributes in drupal/core/vendor/symfony-cmf/routing/Symfony/Cmf/Component/Routing/NestedMatcher/UrlMatcher.php
Returns an array of values to use as request attributes.

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Matcher/UrlMatcher.php, line 165

Class

UrlMatcher
UrlMatcher matches URL based on a set of routes.

Namespace

Symfony\Component\Routing\Matcher

Code

protected function getAttributes(Route $route, $name, array $attributes) {
  $attributes['_route'] = $name;
  return $this
    ->mergeDefaults($attributes, $route
    ->getDefaults());
}