MediaWiki
REL1_34
MessageFormatterFactory.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\Message
;
4
5
use
Wikimedia\Message\IMessageFormatterFactory
;
6
use
Wikimedia\Message\ITextFormatter
;
7
11
class
MessageFormatterFactory
implements
IMessageFormatterFactory
{
12
private
$textFormatters
= [];
13
20
public
function
__construct
() {
21
}
22
23
public
function
getTextFormatter
( $langCode ):
ITextFormatter
{
24
if
( !isset( $this->textFormatters[$langCode] ) ) {
25
$this->textFormatters[$langCode] =
new
TextFormatter
( $langCode );
26
}
27
return
$this->textFormatters[$langCode];
28
}
29
}
if
if(ini_get('mbstring.func_overload')) if(!defined('MW_ENTRY_POINT'))
Pre-config setup: Before loading LocalSettings.php.
Definition
Setup.php:57
MediaWiki\Message\MessageFormatterFactory
The MediaWiki-specific implementation of IMessageFormatterFactory.
Definition
MessageFormatterFactory.php:11
MediaWiki\Message\MessageFormatterFactory\getTextFormatter
getTextFormatter( $langCode)
Get a text message formatter for a given language.
Definition
MessageFormatterFactory.php:23
MediaWiki\Message\MessageFormatterFactory\$textFormatters
$textFormatters
Definition
MessageFormatterFactory.php:12
MediaWiki\Message\MessageFormatterFactory\__construct
__construct()
Required parameters may be added to this function without deprecation.
Definition
MessageFormatterFactory.php:20
MediaWiki\Message\TextFormatter
The MediaWiki-specific implementation of ITextFormatter.
Definition
TextFormatter.php:15
Wikimedia\Message\IMessageFormatterFactory
A simple factory providing a message formatter for a given language code.
Definition
IMessageFormatterFactory.php:10
Wikimedia\Message\ITextFormatter
Definition
ITextFormatter.php:18
MediaWiki\Message
Definition
MessageFormatterFactory.php:3
includes
Message
MessageFormatterFactory.php
Generated on Fri Apr 5 2024 23:10:17 for MediaWiki by
1.9.8