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
}
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
if
if($IP===false)
Definition
initImageData.php:4
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 Mon Nov 25 2024 16:05:30 for MediaWiki by
1.10.0