MediaWiki master
|
Service for transformation of interface message text. More...
Public Member Functions | |
__construct (ParserFactory $parserFactory, OutputTransformPipeline $outputPipeline, LanguageFactory $languageFactory, LoggerInterface $logger) | |
parse (string $text, ?PageReference $contextPage=null, bool $lineStart=true, bool $interface=false, $language=null) | |
parseWithoutPostprocessing ( $text, ?PageReference $page=null, $lineStart=true, $interface=false, $language=null) | |
transform ( $message, $interface=false, $language=null, ?PageReference $page=null) | |
Run message text through the preprocessor, expanding parser functions. | |
Service for transformation of interface message text.
Definition at line 25 of file MessageParser.php.
MediaWiki\Language\MessageParser::__construct | ( | ParserFactory | $parserFactory, |
OutputTransformPipeline | $outputPipeline, | ||
LanguageFactory | $languageFactory, | ||
LoggerInterface | $logger ) |
Definition at line 48 of file MessageParser.php.
MediaWiki\Language\MessageParser::parse | ( | string | $text, |
?PageReference | $contextPage = null, | ||
bool | $lineStart = true, | ||
bool | $interface = false, | ||
$language = null ) |
string | $text | |
?PageReference | $contextPage | The context page, or null to use a placeholder |
bool | $lineStart | Whether this should be parsed in start-of-line context |
bool | $interface | Whether this is an interface message |
Language | StubUserLang | string | null | $language | Language for {{PLURAL:}} etc., or null for the user or content language depending on $interface |
Definition at line 105 of file MessageParser.php.
MediaWiki\Language\MessageParser::parseWithoutPostprocessing | ( | $text, | |
?PageReference | $page = null, | ||
$lineStart = true, | |||
$interface = false, | |||
$language = null ) |
string | $text | |
?PageReference | $page | The context title, or null to use a placeholder |
bool | $lineStart | Whether this is at the start of a line |
bool | $interface | Whether this is an interface message |
Language | StubUserLang | string | null | $language | Target language |
Definition at line 146 of file MessageParser.php.
MediaWiki\Language\MessageParser::transform | ( | $message, | |
$interface = false, | |||
$language = null, | |||
?PageReference | $page = null ) |
Run message text through the preprocessor, expanding parser functions.
string | $message | |
bool | $interface | |
Language | string | null | $language | Language for {{PLURAL:}} etc., or null for the user or content language depending on $interface |
PageReference | null | $page |
Definition at line 70 of file MessageParser.php.