class UrlMatcher in Zircon Profile 8
Same name in this branch
- 8 vendor/symfony-cmf/routing/NestedMatcher/UrlMatcher.php \Symfony\Cmf\Component\Routing\NestedMatcher\UrlMatcher
- 8 vendor/symfony/routing/Matcher/UrlMatcher.php \Symfony\Component\Routing\Matcher\UrlMatcher
- 8 core/lib/Drupal/Core/Routing/UrlMatcher.php \Drupal\Core\Routing\UrlMatcher
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Routing/UrlMatcher.php \Drupal\Core\Routing\UrlMatcher
Drupal-specific URL Matcher; handles the Drupal "system path" mapping.
Hierarchy
- class \Symfony\Component\Routing\Matcher\UrlMatcher implements RequestMatcherInterface, UrlMatcherInterface
- class \Symfony\Cmf\Component\Routing\NestedMatcher\UrlMatcher implements FinalMatcherInterface
- class \Drupal\Core\Routing\UrlMatcher
- class \Symfony\Cmf\Component\Routing\NestedMatcher\UrlMatcher implements FinalMatcherInterface
Expanded class hierarchy of UrlMatcher
1 string reference to 'UrlMatcher'
- core.services.yml in core/
core.services.yml - core/core.services.yml
1 service uses UrlMatcher
File
- core/
lib/ Drupal/ Core/ Routing/ UrlMatcher.php, line 18 - Contains \Drupal\Core\Routing\UrlMatcher.
Namespace
Drupal\Core\RoutingView source
class UrlMatcher extends BaseUrlMatcher {
/**
* The current path.
*
* @var \Drupal\Core\Path\CurrentPathStack
*/
protected $currentPath;
/**
* Constructs a new UrlMatcher.
*
* The parent class has a constructor we need to skip, so just override it
* with a no-op.
*
* @param \Drupal\Core\Path\CurrentPathStack $current_path
* The current path.
*/
public function __construct(CurrentPathStack $current_path) {
$this->currentPath = $current_path;
}
public function finalMatch(RouteCollection $collection, Request $request) {
$this->routes = $collection;
$context = new RequestContext();
$context
->fromRequest($request);
$this
->setContext($context);
return $this
->match($this->currentPath
->getPath($request));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UrlMatcher:: |
protected | property | ||
UrlMatcher:: |
protected | property | ||
UrlMatcher:: |
protected | property | The current path. | |
UrlMatcher:: |
protected | property | ||
UrlMatcher:: |
protected | property | ||
UrlMatcher:: |
protected | property | ||
UrlMatcher:: |
protected | property | ||
UrlMatcher:: |
public | function | ||
UrlMatcher:: |
public | function |
Matches a request against a route collection and returns exactly one result. Overrides UrlMatcher:: |
|
UrlMatcher:: |
protected | function |
Returns an array of values to use as request attributes. Overrides UrlMatcher:: |
|
UrlMatcher:: |
public | function |
Gets the request context. Overrides RequestContextAwareInterface:: |
|
UrlMatcher:: |
protected | function | ||
UrlMatcher:: |
protected | function | Handles specific route requirements. | 1 |
UrlMatcher:: |
public | function |
Tries to match a URL path with a set of routes. Overrides UrlMatcherInterface:: |
5 |
UrlMatcher:: |
protected | function | Tries to match a URL with a set of routes. | 1 |
UrlMatcher:: |
public | function |
Tries to match a request with a set of routes. Overrides RequestMatcherInterface:: |
|
UrlMatcher:: |
protected | function | Get merged default parameters. | |
UrlMatcher:: |
constant | |||
UrlMatcher:: |
constant | |||
UrlMatcher:: |
constant | |||
UrlMatcher:: |
public | function |
Sets the request context. Overrides RequestContextAwareInterface:: |
|
UrlMatcher:: |
public | function |
Constructs a new UrlMatcher. Overrides UrlMatcher:: |