LocaleStack final class
Minn\I18n\LocaleStack · public/minn/src/Minn/I18n/LocaleStack.php · 42 lines
The locales a request switched into, innermost last, each with the user whose locale it is (false when a locale was named outright). Empty means the request speaks its own locale.
Used by 1
Constants and properties
| private | array $stack |
Public
| method | push(string $locale, int|false $userId = false): void# | Enters a locale, a user's or one named outright. |
| method | pop(): ?string# | Leaves the innermost locale; the one now in force, or null when none is switched. |
| method | clear(): void# | Leaves every switched locale. |
| method | current(): ?string# | The innermost switched locale, or null. |
| method | currentUser(): int|false# | The user whose locale is innermost, or false (none switched, or a locale named outright). |
| method | switched(): bool# | Whether any locale is switched in. |
Nothing matches.