MediaWiki  master
Message\MessageFormatterFactory Class Reference

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

Inheritance diagram for Message\MessageFormatterFactory:
Collaboration diagram for Message\MessageFormatterFactory:

Public Member Functions

 __construct (string $format=Message::FORMAT_TEXT)
 Required parameters may be added to this function without deprecation. More...
 
 getTextFormatter ( $langCode)
 Get a text message formatter for a given language.
Parameters
string$langCodeThe language code
Returns
ITextFormatter
More...
 

Private Attributes

string $format
 
array $textFormatters = []
 

Detailed Description

The MediaWiki-specific implementation of IMessageFormatterFactory.

Definition at line 12 of file MessageFormatterFactory.php.

Constructor & Destructor Documentation

◆ __construct()

Message\MessageFormatterFactory::__construct ( string  $format = Message::FORMAT_TEXT)

Required parameters may be added to this function without deprecation.

External callers should use MediaWikiServices::getMessageFormatterFactory().

Parameters
string$formatwhich if the Message::FORMAT_* to use in the formatters.

Definition at line 27 of file MessageFormatterFactory.php.

References Message\MessageFormatterFactory\$format.

Member Function Documentation

◆ getTextFormatter()

Message\MessageFormatterFactory::getTextFormatter (   $langCode)

Get a text message formatter for a given language.

Parameters
string$langCodeThe language code
Returns
ITextFormatter

Implements Wikimedia\Message\IMessageFormatterFactory.

Definition at line 34 of file MessageFormatterFactory.php.

Member Data Documentation

◆ $format

string Message\MessageFormatterFactory::$format
private

◆ $textFormatters

array Message\MessageFormatterFactory::$textFormatters = []
private

Definition at line 18 of file MessageFormatterFactory.php.


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