Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
BabelServices | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
wrap | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getConfig | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Babel; |
4 | |
5 | use MediaWiki\Config\Config; |
6 | use MediaWiki\MediaWikiServices; |
7 | |
8 | class BabelServices { |
9 | |
10 | private MediaWikiServices $coreServices; |
11 | |
12 | public function __construct( MediaWikiServices $coreServices ) { |
13 | $this->coreServices = $coreServices; |
14 | } |
15 | |
16 | /** |
17 | * Static version of the constructor, for nicer syntax. |
18 | * @return static |
19 | */ |
20 | public static function wrap( MediaWikiServices $coreServices ) { |
21 | return new static( $coreServices ); |
22 | } |
23 | |
24 | public function getConfig(): Config { |
25 | return $this->coreServices->getService( 'Babel.Config' ); |
26 | } |
27 | } |