MediaWiki
1.34.0
|
The MediaWiki-specific implementation of ITextFormatter. More...
Public Member Functions | |
__construct ( $langCode) | |
Construct a TextFormatter. More... | |
format (MessageValue $mv) | |
getLangCode () | |
Get the internal language code in which format() is. More... | |
Public Member Functions inherited from Wikimedia\Message\ITextFormatter | |
format (MessageValue $message) | |
Convert a MessageValue to text. More... | |
Protected Member Functions | |
createMessage ( $key) | |
Allow the Message class to be mocked in tests by constructing objects in a protected method. More... | |
Private Member Functions | |
convertParam (MessageParam $param) | |
Private Attributes | |
string | $langCode |
The MediaWiki-specific implementation of ITextFormatter.
Definition at line 15 of file TextFormatter.php.
Message\TextFormatter::__construct | ( | $langCode | ) |
Construct a TextFormatter.
The type signature may change without notice as dependencies are added to the constructor. External callers should use MediaWikiServices::getMessageFormatterFactory()
Definition at line 28 of file TextFormatter.php.
References Message\TextFormatter\$langCode.
|
private |
Definition at line 48 of file TextFormatter.php.
References Message\TextFormatter\createMessage(), and Wikimedia\Message\ParamType\TEXT.
Referenced by Message\TextFormatter\format().
|
protected |
Allow the Message class to be mocked in tests by constructing objects in a protected method.
Definition at line 40 of file TextFormatter.php.
Referenced by Message\TextFormatter\convertParam(), and Message\TextFormatter\format().
Message\TextFormatter::format | ( | MessageValue | $mv | ) |
Definition at line 75 of file TextFormatter.php.
References Message\TextFormatter\convertParam(), and Message\TextFormatter\createMessage().
Message\TextFormatter::getLangCode | ( | ) |
Get the internal language code in which format() is.
Implements Wikimedia\Message\ITextFormatter.
Definition at line 44 of file TextFormatter.php.
References Message\TextFormatter\$langCode.
|
private |
Definition at line 17 of file TextFormatter.php.
Referenced by Message\TextFormatter\__construct(), and Message\TextFormatter\getLangCode().