function UrlMatcher::handleRouteRequirements
Handles specific route requirements.
Return value
array The first element represents the status, the second contains additional information
3 calls to UrlMatcher::handleRouteRequirements()
- Router::doMatchCollection in core/
lib/ Drupal/ Core/ Routing/ Router.php - Tries to match a URL with a set of routes.
- TraceableUrlMatcher::matchCollection in vendor/
symfony/ routing/ Matcher/ TraceableUrlMatcher.php - Tries to match a URL with a set of routes.
- UrlMatcher::matchCollection in vendor/
symfony/ routing/ Matcher/ UrlMatcher.php - Tries to match a URL with a set of routes.
File
-
vendor/
symfony/ routing/ Matcher/ UrlMatcher.php, line 212
Class
- UrlMatcher
- UrlMatcher matches URL based on a set of routes.
Namespace
Symfony\Component\Routing\MatcherCode
protected function handleRouteRequirements(string $pathinfo, string $name, Route $route, array $routeParameters) : array {
// expression condition
if ($route->getCondition() && !$this->getExpressionLanguage()
->evaluate($route->getCondition(), [
'context' => $this->context,
'request' => $this->request ?: $this->createRequest($pathinfo),
'params' => $routeParameters,
])) {
return [
self::REQUIREMENT_MISMATCH,
null,
];
}
return [
self::REQUIREMENT_MATCH,
null,
];
}