LanguageContext
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- getLang() : int|string|null
- getLanguage() : Language|null
- getLanguageId() : int|null
- requireLanguageId() : int
- Returns the language id where the caller cannot continue without it (translation, e-mail).
- setLang() : self
- setLanguage() : self
Properties
$lang
private
int|string|null
$lang
$language
private
Language|null
$language
= null
Methods
__construct()
public
__construct(Request $httpRequest) : mixed
Parameters
- $httpRequest : Request
getLang()
public
getLang() : int|string|null
Return values
int|string|nullgetLanguage()
public
getLanguage() : Language|null
Return values
Language|nullgetLanguageId()
public
getLanguageId() : int|null
Return values
int|nullrequireLanguageId()
Returns the language id where the caller cannot continue without it (translation, e-mail).
public
requireLanguageId() : int
Presenters always have it: LanguageInitTrait
sets it in startup. Passing a null id to getTranslation(int) / sendEmail(int) would
end in a TypeError, so a missing language throws here instead.
Return values
intsetLang()
public
setLang(int|string|null $lang) : self
Parameters
- $lang : int|string|null
Return values
selfsetLanguage()
public
setLanguage(Language|null $language) : self
Parameters
- $language : Language|null