MediaWiki  master
Message\TextFormatter Class Reference

The MediaWiki-specific implementation of ITextFormatter. More...

Inheritance diagram for Message\TextFormatter:
Collaboration diagram for Message\TextFormatter:

Public Member Functions

 __construct (string $langCode, Converter $converter, string $format=Message::FORMAT_TEXT)
 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...

Detailed Description

The MediaWiki-specific implementation of ITextFormatter.

Definition at line 12 of file TextFormatter.php.

Constructor & Destructor Documentation

◆ __construct()

Message\TextFormatter::__construct ( string  $langCode,
Converter  $converter,
string  $format = Message::FORMAT_TEXT 

Construct a TextFormatter.

The type signature may change without notice as dependencies are added to the constructor. External callers should use MediaWikiServices::getMessageFormatterFactory()

Access: internal

Definition at line 34 of file TextFormatter.php.

References Message\TextFormatter\format().

Member Function Documentation

◆ format()

Message\TextFormatter::format ( MessageValue  $mv)

Definition at line 48 of file TextFormatter.php.

References Message\$message.

Referenced by Message\TextFormatter\__construct().

◆ getLangCode()

Message\TextFormatter::getLangCode ( )

Get the internal language code in which format() is.


Implements Wikimedia\Message\ITextFormatter.

Definition at line 44 of file TextFormatter.php.

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