MediaWiki REL1_37
|
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more information. More...
Public Member Functions | |
__construct (ServiceOptions $options, LocalisationCache $localisationCache, LanguageNameUtils $langNameUtils, LanguageFallback $langFallback, LanguageConverterFactory $langConverterFactory, HookContainer $hookContainer) | |
getLanguage ( $code) | |
Get a cached or new language object for a given language code. | |
getParentLanguage ( $code) | |
Get the "parent" language which has a converter to convert a "compatible" language (in another variant) to this language (eg. | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
Private Member Functions | |
classFromCode ( $code, $fallback=true) | |
newFromCode ( $code, $fallback=false) | |
Create a language object for a given language code. | |
Private Attributes | |
HookContainer | $hookContainer |
LanguageConverterFactory | $langConverterFactory |
LanguageFallback | $langFallback |
LanguageNameUtils | $langNameUtils |
MapCacheLRU | $langObjCache |
LocalisationCache | $localisationCache |
ServiceOptions | $options |
array | $parentLangCache = [] |
const | LANG_CACHE_SIZE = 10 |
How many distinct Language objects to retain at most in memory (T40439). | |
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more information.
Definition at line 42 of file LanguageFactory.php.
MediaWiki\Languages\LanguageFactory::__construct | ( | ServiceOptions | $options, |
LocalisationCache | $localisationCache, | ||
LanguageNameUtils | $langNameUtils, | ||
LanguageFallback | $langFallback, | ||
LanguageConverterFactory | $langConverterFactory, | ||
HookContainer | $hookContainer | ||
) |
ServiceOptions | $options | |
LocalisationCache | $localisationCache | |
LanguageNameUtils | $langNameUtils | |
LanguageFallback | $langFallback | |
LanguageConverterFactory | $langConverterFactory | |
HookContainer | $hookContainer |
Definition at line 85 of file LanguageFactory.php.
References MediaWiki\Languages\LanguageFactory\$hookContainer, MediaWiki\Languages\LanguageFactory\$langConverterFactory, MediaWiki\Languages\LanguageFactory\$langFallback, MediaWiki\Languages\LanguageFactory\$langNameUtils, MediaWiki\Languages\LanguageFactory\$localisationCache, MediaWiki\Languages\LanguageFactory\$options, and MediaWiki\Config\ServiceOptions\assertRequiredOptions().
|
private |
string | $code | |
bool | $fallback | Whether we're going through language fallback chain |
Definition at line 175 of file LanguageFactory.php.
References $fallback.
MediaWiki\Languages\LanguageFactory::getLanguage | ( | $code | ) |
Get a cached or new language object for a given language code.
string | $code |
MWException | if the language code contains dangerous characters, e.g. HTML special characters or characters illegal in MediaWiki titles. |
Definition at line 111 of file LanguageFactory.php.
References MediaWiki\Languages\LanguageFactory\newFromCode().
Referenced by CollationCkb\__construct(), UppercaseCollation\__construct(), NumericUppercaseCollation\__construct(), IcuCollation\__construct(), and CustomUppercaseCollation\__construct().
MediaWiki\Languages\LanguageFactory::getParentLanguage | ( | $code | ) |
Get the "parent" language which has a converter to convert a "compatible" language (in another variant) to this language (eg.
zh for zh-cn, but not en for en-gb).
string | $code |
Definition at line 191 of file LanguageFactory.php.
References $lang.
|
private |
Create a language object for a given language code.
string | $code | |
bool | $fallback | Whether we're going through language fallback chain |
MWException | if the language code or fallback sequence is invalid |
Definition at line 130 of file LanguageFactory.php.
Referenced by MediaWiki\Languages\LanguageFactory\getLanguage().
|
private |
Definition at line 59 of file LanguageFactory.php.
Referenced by MediaWiki\Languages\LanguageFactory\__construct().
|
private |
Definition at line 56 of file LanguageFactory.php.
Referenced by MediaWiki\Languages\LanguageFactory\__construct().
|
private |
Definition at line 53 of file LanguageFactory.php.
Referenced by MediaWiki\Languages\LanguageFactory\__construct().
|
private |
Definition at line 50 of file LanguageFactory.php.
Referenced by MediaWiki\Languages\LanguageFactory\__construct().
|
private |
Definition at line 62 of file LanguageFactory.php.
|
private |
Definition at line 47 of file LanguageFactory.php.
Referenced by MediaWiki\Languages\LanguageFactory\__construct().
|
private |
Definition at line 44 of file LanguageFactory.php.
Referenced by MediaWiki\Languages\LanguageFactory\__construct().
|
private |
Definition at line 65 of file LanguageFactory.php.
const MediaWiki\Languages\LanguageFactory::CONSTRUCTOR_OPTIONS |
Definition at line 70 of file LanguageFactory.php.
|
private |
How many distinct Language objects to retain at most in memory (T40439).
Definition at line 75 of file LanguageFactory.php.