SECURITY: rate-limit and prevent blocked users from changing email
[lhc/web/wiklou.git] / includes / parser / DateFormatterFactory.php
1 <?php
2
3 class DateFormatterFactory {
4 /** @var DateFormatter[] */
5 private $instances;
6
7 /**
8 * @param Language $lang
9 * @return DateFormatter
10 */
11 public function get( Language $lang ) {
12 $code = $lang->getCode();
13 if ( !isset( $this->instances[$code] ) ) {
14 $this->instances[$code] = new DateFormatter( $lang );
15 }
16 return $this->instances[$code];
17 }
18 }