else { $hasTrailingVar = false;
} } $hostMatches =
[];
if ($compiledRoute->
getHostRegex() && !
preg_match($compiledRoute->
getHostRegex(),
$this->context->
getHost(),
$hostMatches)) { $this->
addTrace(sprintf('Host "%s" does not match the requirement ("%s")',
$this->context->
getHost(),
$route->
getHost()), self::ROUTE_ALMOST_MATCHES,
$name,
$route);
continue;
} $attributes =
$this->
getAttributes($route,
$name,
array_replace($matches,
$hostMatches));
$status =
$this->
handleRouteRequirements($pathinfo,
$name,
$route,
$attributes);
if (self::REQUIREMENT_MISMATCH ===
$status[0
]) { $this->
addTrace(sprintf('Condition "%s" does not evaluate to "true"',
$route->
getCondition()), self::ROUTE_ALMOST_MATCHES,
$name,
$route);
continue;
} if ('/' !==
$pathinfo && !
$hasTrailingVar &&
$hasTrailingSlash === ($trimmedPathinfo ===
$pathinfo)) { if ($supportsTrailingSlash && (!
$requiredMethods || \
in_array('GET',
$requiredMethods))) { $this->
addTrace('Route matches!', self::ROUTE_MATCHES,
$name,
$route);