50 $convertedElements = [];
51 foreach ( $param->
getValue() as $element ) {
60 foreach ( $mv->getParams() as $mvParam ) {
68 return [ $param->
getType() => $value ];
71 throw new \InvalidArgumentException(
'Invalid message parameter type' );
80 $message->inLanguage( $this->langCode );
81 return $message->text();
The MediaWiki-specific implementation of ITextFormatter.
__construct( $langCode)
Construct a TextFormatter.
createMessage( $key)
Allow the Message class to be mocked in tests by constructing objects in a protected method.
getLangCode()
Get the internal language code in which format() is.
convertParam(MessageParam $param)
format(MessageValue $mv)
Convert a MessageValue to text.
The Message class provides methods which fulfil two basic services:
static listParam(array $list, $type='text')