MediaWiki
master
DateFormatterFactory.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\Parser
;
4
5
use
MediaWiki\Language\Language
;
6
7
class
DateFormatterFactory
{
9
private
$instances;
10
15
public
function
get
(
Language
$lang ) {
16
$code = $lang->getCode();
17
if
( !isset( $this->instances[$code] ) ) {
18
$this->instances[$code] =
new
DateFormatter
( $lang );
19
}
20
return
$this->instances[$code];
21
}
22
}
23
25
class_alias( DateFormatterFactory::class,
'DateFormatterFactory'
);
MediaWiki\Language\Language
Base class for language-specific code.
Definition
Language.php:78
MediaWiki\Parser\DateFormatterFactory
Definition
DateFormatterFactory.php:7
MediaWiki\Parser\DateFormatter
Date formatter.
Definition
DateFormatter.php:41
MediaWiki\Parser
Definition
BlockLevelPass.php:27
includes
parser
DateFormatterFactory.php
Generated on Fri Nov 8 2024 15:45:30 for MediaWiki by
1.10.0