scriptlog:lib:core:localerouter
This is an old revision of the document!
Table of Contents
LocaleRouter
Layer: Core · Source: lib/core/LocaleRouter.php:7 (lines 7–112)
class LocaleRouter
Inheritance
No parent, interface or trait. This is a root type.
Constants (0)
None.
Properties (2)
^ Visibility ^ Type ^ Name ^ Default ^ Line ^ | ''private'' | ''(untyped)'' | ''$routes'' | ''[];'' | 9 | | ''private'' | ''(untyped)'' | ''$availableLocales'' | ''[];'' | 11 |
Methods (10)
^ Visibility ^ Method ^ Summary ^ Line ^ | public | ''__construct()'' | (undocumented) | 13 | | private | ''registerDefaultRoutes()'' | (undocumented) | 20 | | public | ''addRoute()'' | (undocumented) | 34 | | public | ''extractLocale()'' | (undocumented) | 62 | | public | ''stripLocalePrefix()'' | (undocumented) | 75 | | public | ''buildUrl()'' | (undocumented) | 85 | | public | ''buildCurrentUrl()'' | (undocumented) | 93 | | public | ''getRoutes()'' | (undocumented) | 98 | | public | ''hasLocalePrefix()'' | (undocumented) | 103 | | public | ''getDetector()'' | (undocumented) | 108 |
__construct()
public function __construct(array $detectorSettings = [])
lines 13–18 (6)
^ Parameter ^ Type ^ Default ^ Description ^ | ''$detectorSettings'' | ''array'' | ''[]'' | //none// |
registerDefaultRoutes()
private function registerDefaultRoutes(): void
lines 20–32 (13)
Takes no parameters.
Returns: void
addRoute()
public function addRoute(string $name, string $pattern): void
lines 34–37 (4)
^ Parameter ^ Type ^ Default ^ Description ^ | ''$name'' | ''string'' | //required// | //none// | | ''$pattern'' | ''string'' | //required// | //none// |
Returns: void
extractLocale()
public function extractLocale(string $path): ?string
lines 62–73 (12)
^ Parameter ^ Type ^ Default ^ Description ^ | ''$path'' | ''string'' | //required// | //none// |
Returns: ?string
stripLocalePrefix()
public function stripLocalePrefix(string $path): string
lines 75–83 (9)
^ Parameter ^ Type ^ Default ^ Description ^ | ''$path'' | ''string'' | //required// | //none// |
Returns: string
buildUrl()
public function buildUrl(string $path, ?string $locale = null): string
lines 85–91 (7)
^ Parameter ^ Type ^ Default ^ Description ^ | ''$path'' | ''string'' | //required// | //none// | | ''$locale'' | ''?string'' | ''null'' | //none// |
Returns: string
buildCurrentUrl()
public function buildCurrentUrl(string $path): string
lines 93–96 (4)
^ Parameter ^ Type ^ Default ^ Description ^ | ''$path'' | ''string'' | //required// | //none// |
Returns: string
getRoutes()
public function getRoutes(): array
lines 98–101 (4)
Takes no parameters.
Returns: array
hasLocalePrefix()
public function hasLocalePrefix(string $path): bool
lines 103–106 (4)
^ Parameter ^ Type ^ Default ^ Description ^ | ''$path'' | ''string'' | //required// | //none// |
Returns: bool
getDetector()
public function getDetector(): LocaleDetector
lines 108–111 (4)
Takes no parameters.
Returns: ''LocaleDetector''
This page is generated from source by 'tools/gendoc'. Edits will be overwritten.
scriptlog/lib/core/localerouter.1790413762.txt.gz · Last modified: by admin
