MediaWiki  master
Message\Converter Class Reference

Converter between Message and MessageValue. More...

Public Member Functions

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

Detailed Description

Converter between Message and MessageValue.

Since
1.35

Definition at line 18 of file Converter.php.

Member Function Documentation

◆ convertMessage()

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()

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 Message\Converter\createMessage().

◆ createMessage()

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 Message\Converter\convertMessageValue().


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