Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 18 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | use MediaWiki\Config\ServiceOptions; |
4 | use MediaWiki\Extension\EventStreamConfig\Hooks\HookRunner; |
5 | use MediaWiki\Extension\EventStreamConfig\StreamConfigs; |
6 | use MediaWiki\Extension\EventStreamConfig\StreamConfigsFactory; |
7 | use MediaWiki\Logger\LoggerFactory; |
8 | use MediaWiki\MediaWikiServices; |
9 | |
10 | return [ |
11 | 'EventStreamConfig.HookRunner' => static function ( MediaWikiServices $services ): HookRunner { |
12 | return new HookRunner( $services->getHookContainer() ); |
13 | }, |
14 | 'EventStreamConfig.StreamConfigs' => static function ( MediaWikiServices $services ): StreamConfigs { |
15 | $options = new ServiceOptions( |
16 | StreamConfigsFactory::CONSTRUCTOR_OPTIONS, |
17 | $services->getMainConfig() |
18 | ); |
19 | $logger = LoggerFactory::getInstance( 'EventStreamConfig' ); |
20 | |
21 | $factory = new StreamConfigsFactory( |
22 | $options, |
23 | $services->get( 'EventStreamConfig.HookRunner' ), |
24 | $logger |
25 | ); |
26 | |
27 | return $factory->getInstance(); |
28 | } |
29 | ]; |