Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6006139
MessageFormatterFactory.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
982 B
Referenced Files
None
Subscribers
None
MessageFormatterFactory.php
View Options
<?php
namespace
MediaWiki\Message
;
use
Wikimedia\Message\IMessageFormatterFactory
;
use
Wikimedia\Message\ITextFormatter
;
/**
* The MediaWiki-specific implementation of IMessageFormatterFactory
*
* To obtain an instance, use \MediaWiki\MediaWikiServices::getMessageFormatterFactory().
*
* @ingroup Language
*/
class
MessageFormatterFactory
implements
IMessageFormatterFactory
{
private
string
$format
;
private
array
$textFormatters
=
[];
/**
* @internal For use by ServiceWiring only
* @param string $format which if the Message::FORMAT_* to use in the formatters.
*/
public
function
__construct
(
string
$format
=
Message
::
FORMAT_TEXT
)
{
$this
->
format
=
$format
;
}
/**
* @inheritDoc
*/
public
function
getTextFormatter
(
string
$langCode
):
ITextFormatter
{
if
(
!
isset
(
$this
->
textFormatters
[
$langCode
]
)
)
{
$this
->
textFormatters
[
$langCode
]
=
new
TextFormatter
(
$langCode
,
$this
->
format
);
}
return
$this
->
textFormatters
[
$langCode
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 4 2026, 08:12 (6 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
be/7f/a98227d6717abb2e70de5d74cce7
Default Alt Text
MessageFormatterFactory.php (982 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment