com\setasign\SetaSite\Page

PagePathAndLanguageNegotiator

File: /SetaSite/src/Page/PagePathAndLanguageNegotiator.php

Class hierarchy

Summary

Properties


Methods

__construct()

public PagePathAndLanguageNegotiator::__construct (
\com\setasign\SetaFramework\Bootstrap\RequestPathPrefix $requestPathPrefix,
PageSettings $pageSettings,
\com\setasign\SetaFramework\Http\HttpFactoryInterface $httpFactory
)
Parameters
$requestPathPrefix : \com\setasign\SetaFramework\Bootstrap\RequestPathPrefix
 
$pageSettings : PageSettings
 
$httpFactory : \com\setasign\SetaFramework\Http\HttpFactoryInterface
 

extractLanguageFromPath()

protected PagePathAndLanguageNegotiator::extractLanguageFromPath (
string $path
): array

Removes the requestPathPrefix and the language identifier from path

Parameters
$path : string
 
Return Values

With the entries [$path, $language]

handle()

public PagePathAndLanguageNegotiator::handle (
\com\setasign\SetaFramework\Request\ServerRequest $request
): array

Handle the page language and page path.

Parameters
$request : \com\setasign\SetaFramework\Request\ServerRequest
 
Return Values

With the entries [$path, $language]

Exceptions

Throws \com\setasign\SetaSite\Block\ForceResponseException

negotiateLanguage()

protected PagePathAndLanguageNegotiator::negotiateLanguage (
string $path,
?string $language,
\com\setasign\SetaFramework\Request\ServerRequest $request
): string
Parameters
$path : string
 
$language : ?string
 
$request : \com\setasign\SetaFramework\Request\ServerRequest
 
Exceptions

Throws \com\setasign\SetaSite\Block\ForceResponseException