MediaWiki REL1_39
MediaWiki\Message\Converter Class Reference

Converter between Message and MessageValue. More...

Public Member Functions

 convertMessage (Message $m)
 Convert a Message to a MessageValue.
 
 convertMessageValue (MessageValue $mv)
 Convert a MessageValue to a Message.
 
 createMessage ( $key)
 Allow the Message class to be mocked in tests by constructing objects in a protected method.
 

Detailed Description

Converter between Message and MessageValue.

Since
1.35

Definition at line 18 of file Converter.php.

Member Function Documentation

◆ convertMessage()

MediaWiki\Message\Converter::convertMessage ( Message $m)

Convert a Message to a MessageValue.

Parameters
Message$m
Returns
MessageValue

Definition at line 53 of file Converter.php.

References Message\getKey(), and Message\getParams().

◆ convertMessageValue()

MediaWiki\Message\Converter::convertMessageValue ( MessageValue $mv)

Convert a MessageValue to a Message.

Parameters
MessageValue$mv
Returns
Message

Definition at line 96 of file Converter.php.

References MediaWiki\Message\Converter\createMessage(), Wikimedia\Message\MessageValue\getKey(), and Wikimedia\Message\MessageValue\getParams().

◆ createMessage()

MediaWiki\Message\Converter::createMessage ( $key)

Allow the Message class to be mocked in tests by constructing objects in a protected method.

Access: internal
Parameters
string$key
Returns
Message

Definition at line 44 of file Converter.php.

Referenced by MediaWiki\Message\Converter\convertMessageValue().


The documentation for this class was generated from the following file: