LocaleRouting
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- LocaleService constructor
- extractLocaleFromPath() : array<string|int, mixed>
- getCookieLocale() : string|null
- getDomain() : string|null
- getDomainExtension() : string|null
- getExpectedLocales() : array<string|int, mixed>
- getLocaleFromHttpFormat() : string
- getPreferredHttpLocales() : array<string|int, mixed>
- getPreferredLocale() : string|null
- getRequest() : InputRequest
- matchPath() : string
Properties
$request
private
InputRequest
$request
Methods
__construct()
LocaleService constructor
public
__construct(InputRequest $request) : mixed
Parameters
- $request : InputRequest
extractLocaleFromPath()
public
extractLocaleFromPath() : array<string|int, mixed>
Return values
array<string|int, mixed> —[string $locale, HttpRequest $request] if containing a request, else an array of null values
getCookieLocale()
public
getCookieLocale() : string|null
Return values
string|nullgetDomain()
public
getDomain() : string|null
Return values
string|nullgetDomainExtension()
public
getDomainExtension() : string|null
Return values
string|nullgetExpectedLocales()
public
getExpectedLocales() : array<string|int, mixed>
Return values
array<string|int, mixed>getLocaleFromHttpFormat()
public
static getLocaleFromHttpFormat(mixed $httpLocale) : string
Parameters
- $httpLocale : mixed
Return values
stringgetPreferredHttpLocales()
public
static getPreferredHttpLocales(HttpRequest $request) : array<string|int, mixed>
Parameters
- $request : HttpRequest
Return values
array<string|int, mixed>getPreferredLocale()
public
getPreferredLocale() : string|null
Return values
string|nullgetRequest()
public
getRequest() : InputRequest
Return values
InputRequestmatchPath()
public
matchPath(string $regex, array<string|int, mixed>|null &$matches) : string
Parameters
- $regex : string
- $matches : array<string|int, mixed>|null