$hasTrailingVar =
$trimmedPathinfo !==
$pathinfo &&
preg_match('#\{[\w\x80-\xFF]+\}/?$#',
$route->
getPath());
if ($hasTrailingVar && ($hasTrailingSlash || (null ===
$m =
$matches[\
count($compiledRoute->
getPathVariables())] ?? null
) || '/'
!== ($m[-1
] ?? '/'
)) &&
preg_match($regex,
$trimmedPathinfo,
$m)) { if ($hasTrailingSlash) { $matches =
$m;
} 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;
}