Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MessageGroupStates.php
1<?php
2declare( strict_types = 1 );
3
4namespace MediaWiki\Extension\Translate\MessageGroupProcessing;
5
15 private const CONDKEY = 'state conditions';
16
17 public function __construct(
18 private readonly ?array $config = null,
19 ) {
20 }
21
22 public function getStates(): ?array {
23 $conf = $this->config;
24 unset( $conf[self::CONDKEY] );
25
26 return $conf;
27 }
28
29 public function getConditions(): array {
30 $conf = $this->config;
31 return $conf[self::CONDKEY] ?? [];
32 }
33}
34
35class_alias( MessageGroupStates::class, 'MessageGroupStates' );