$this->
addTrace(sprintf('Requirement for "%s" does not match (%s)',
$n,
$regex), self::ROUTE_ALMOST_MATCHES,
$name,
$route);
continue 2;
} } continue;
} $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;
}