eZ\Publish\Core\MVC\Symfony\Routing\UrlAliasRouter::needsCaseRedirect PHP Метод

needsCaseRedirect() защищенный Метод

Used to determine if redirect is needed because requested path is case-different from the stored one.
protected needsCaseRedirect ( eZ\Publish\API\Repository\Values\Content\URLAlias $loadedUrlAlias, string $requestedPath, string $pathPrefix ) : boolean
$loadedUrlAlias eZ\Publish\API\Repository\Values\Content\URLAlias
$requestedPath string
$pathPrefix string
Результат boolean
    protected function needsCaseRedirect(URLAlias $loadedUrlAlias, $requestedPath, $pathPrefix)
    {
        // If requested path is excluded from tree root jail, compare it to loaded UrlAlias directly.
        if ($this->generator->isUriPrefixExcluded($requestedPath)) {
            return strcmp($loadedUrlAlias->path, $requestedPath) !== 0;
        }
        // Compare loaded UrlAlias with requested path, prefixed with configured path prefix.
        return strcmp($loadedUrlAlias->path, $pathPrefix . ($pathPrefix === '/' ? trim($requestedPath, '/') : rtrim($requestedPath, '/'))) !== 0;
    }