MediaWiki
1.34.0
|
Public Member Functions | |
convertGrammar ( $lang, $args) | |
convertGrammar handler More... | |
convertPlural ( $lang, $args) | |
convertPlural handler More... | |
fetchLanguageName ( $code, $inLanguage) | |
Handler for fetchLanguageName. More... | |
fetchLanguageNames ( $inLanguage, $include) | |
Handler for fetchLanguageNames. More... | |
formatDate ( $lang, $args) | |
formatDate handler More... | |
formatDuration ( $lang, $args) | |
formatDuration handler More... | |
formatNum ( $lang, $args) | |
formatNum handler More... | |
gender ( $lang, $args) | |
gender handler More... | |
getContLangCode () | |
Handler for getContLangCode. More... | |
getDurationIntervals ( $lang, $args) | |
getDurationIntervals handler More... | |
getFallbacksFor ( $code) | |
Handler for fetchLanguageNames. More... | |
isKnownLanguageTag ( $code) | |
Handler for isKnownLanguageTag. More... | |
isSupportedLanguage ( $code) | |
Handler for isSupportedLanguage. More... | |
isValidBuiltInCode ( $code) | |
Handler for isValidBuiltInCode. More... | |
isValidCode ( $code) | |
Handler for isValidCode. More... | |
languageMethod ( $name, $args) | |
Language object method handler. More... | |
register () | |
Called to register the library. More... | |
Public Member Functions inherited from Scribunto_LuaLibraryBase | |
__construct (Scribunto_LuaEngine $engine) | |
incrementExpensiveFunctionCount () | |
Increment the expensive function count, and throw if limit exceeded. More... | |
Public Attributes | |
$langCache = [] | |
$maxLangCacheSize | |
$timeCache = [] | |
Additional Inherited Members | |
Protected Member Functions inherited from Scribunto_LuaLibraryBase | |
checkType ( $name, $argIdx, $arg, $expectType) | |
Check the type of a variable. More... | |
checkTypeOptional ( $name, $argIdx, &$arg, $expectType, $default) | |
Check the type of a variable, with default if null. More... | |
getEngine () | |
Get the engine. More... | |
getInterpreter () | |
Get the interpreter. More... | |
getLuaType ( $var) | |
Get the Lua type corresponding to the type of the variable. More... | |
getParser () | |
Get the parser. More... | |
getParserOptions () | |
Get the parser options. More... | |
getTitle () | |
Get the title. More... | |
Definition at line 5 of file LanguageLibrary.php.
Scribunto_LuaLanguageLibrary::convertGrammar | ( | $lang, | |
$args | |||
) |
convertGrammar handler
Definition at line 233 of file LanguageLibrary.php.
References $args, $lang, and Scribunto_LuaLibraryBase\checkType().
Scribunto_LuaLanguageLibrary::convertPlural | ( | $lang, | |
$args | |||
) |
convertPlural handler
Definition at line 216 of file LanguageLibrary.php.
References $args, $lang, and Scribunto_LuaLibraryBase\checkType().
Scribunto_LuaLanguageLibrary::fetchLanguageName | ( | $code, | |
$inLanguage | |||
) |
Handler for fetchLanguageName.
Definition at line 122 of file LanguageLibrary.php.
References Scribunto_LuaLibraryBase\checkType(), Scribunto_LuaLibraryBase\checkTypeOptional(), and Language\fetchLanguageName().
Scribunto_LuaLanguageLibrary::fetchLanguageNames | ( | $inLanguage, | |
$include | |||
) |
Handler for fetchLanguageNames.
Definition at line 135 of file LanguageLibrary.php.
References Scribunto_LuaLibraryBase\checkTypeOptional(), and Language\fetchLanguageNames().
Scribunto_LuaLanguageLibrary::formatDate | ( | $lang, | |
$args | |||
) |
formatDate handler
Definition at line 318 of file LanguageLibrary.php.
References $args, $lang, $wgLocaltimezone, Scribunto_LuaLibraryBase\checkType(), Scribunto_LuaLibraryBase\checkTypeOptional(), Scribunto_LuaLibraryBase\getEngine(), and Scribunto_LuaLibraryBase\getParserOptions().
Scribunto_LuaLanguageLibrary::formatDuration | ( | $lang, | |
$args | |||
) |
formatDuration handler
Definition at line 394 of file LanguageLibrary.php.
References $args, $lang, Scribunto_LuaLibraryBase\checkType(), and Scribunto_LuaLibraryBase\checkTypeOptional().
Scribunto_LuaLanguageLibrary::formatNum | ( | $lang, | |
$args | |||
) |
formatNum handler
Definition at line 297 of file LanguageLibrary.php.
References $args, $lang, and Scribunto_LuaLibraryBase\checkType().
Scribunto_LuaLanguageLibrary::gender | ( | $lang, | |
$args | |||
) |
gender handler
Definition at line 246 of file LanguageLibrary.php.
References $args, $lang, $title, Scribunto_LuaLibraryBase\checkType(), User\getDefaultOption(), Scribunto_LuaLibraryBase\getParserOptions(), User\newFromName(), Title\newFromText(), and NS_USER.
Scribunto_LuaLanguageLibrary::getContLangCode | ( | ) |
Handler for getContLangCode.
Definition at line 61 of file LanguageLibrary.php.
References $wgContLang.
Scribunto_LuaLanguageLibrary::getDurationIntervals | ( | $lang, | |
$args | |||
) |
getDurationIntervals handler
Definition at line 413 of file LanguageLibrary.php.
References $args, $lang, Scribunto_LuaLibraryBase\checkType(), and Scribunto_LuaLibraryBase\checkTypeOptional().
Scribunto_LuaLanguageLibrary::getFallbacksFor | ( | $code | ) |
Handler for fetchLanguageNames.
Definition at line 147 of file LanguageLibrary.php.
References Scribunto_LuaLibraryBase\checkType(), and Language\getFallbacksFor().
Scribunto_LuaLanguageLibrary::isKnownLanguageTag | ( | $code | ) |
Handler for isKnownLanguageTag.
Definition at line 88 of file LanguageLibrary.php.
References Scribunto_LuaLibraryBase\checkType(), and Language\isKnownLanguageTag().
Scribunto_LuaLanguageLibrary::isSupportedLanguage | ( | $code | ) |
Handler for isSupportedLanguage.
Definition at line 72 of file LanguageLibrary.php.
References Scribunto_LuaLibraryBase\checkType(), and Language\isSupportedLanguage().
Scribunto_LuaLanguageLibrary::isValidBuiltInCode | ( | $code | ) |
Handler for isValidBuiltInCode.
Definition at line 110 of file LanguageLibrary.php.
References Scribunto_LuaLibraryBase\checkType(), and Language\isValidBuiltInCode().
Scribunto_LuaLanguageLibrary::isValidCode | ( | $code | ) |
Handler for isValidCode.
Definition at line 99 of file LanguageLibrary.php.
References Scribunto_LuaLibraryBase\checkType(), and Language\isValidCode().
Scribunto_LuaLanguageLibrary::languageMethod | ( | $name, | |
$args | |||
) |
Language object method handler.
Definition at line 165 of file LanguageLibrary.php.
References $args, $lang, Scribunto_LuaLibraryBase\checkType(), Language\factory(), and Scribunto_LuaLibraryBase\getLuaType().
Scribunto_LuaLanguageLibrary::register | ( | ) |
Called to register the library.
This should do any necessary setup and then call $this->getEngine()->registerInterface(). The value returned by that call should be returned from this function, and must be for 'deferLoad' libraries to work right.
Reimplemented from Scribunto_LuaLibraryBase.
Definition at line 10 of file LanguageLibrary.php.
References $args, $wgContLang, and Scribunto_LuaLibraryBase\getEngine().
Scribunto_LuaLanguageLibrary::$langCache = [] |
Definition at line 6 of file LanguageLibrary.php.
Scribunto_LuaLanguageLibrary::$maxLangCacheSize |
Definition at line 8 of file LanguageLibrary.php.
Scribunto_LuaLanguageLibrary::$timeCache = [] |
Definition at line 7 of file LanguageLibrary.php.