X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FServiceWiring.php;h=c02b06e6da0a698a1f30c5d70e05f6f9aa06f0e4;hb=82c8c00ce27e836810c58ad99fe420f7f1dab57d;hp=d8709b95f0150a6ce13f93c63a47b2bd35d17868;hpb=75cdcc94007dca953927b13db411aac94750b074;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php index d8709b95f0..c02b06e6da 100644 --- a/includes/ServiceWiring.php +++ b/includes/ServiceWiring.php @@ -72,6 +72,32 @@ return [ return $services->getConfigFactory()->makeConfig( 'main' ); }, + 'StatsdDataFactory' => function( MediaWikiServices $services ) { + return new BufferingStatsdDataFactory( + rtrim( $services->getMainConfig()->get( 'StatsdMetricPrefix' ), '.' ) + ); + }, + + 'EventRelayerGroup' => function( MediaWikiServices $services ) { + return new EventRelayerGroup( $services->getMainConfig()->get( 'EventRelayerConfig' ) ); + }, + + 'SearchEngineFactory' => function( MediaWikiServices $services ) { + // Create search engine + return new SearchEngineFactory( $services->getService( 'SearchEngineConfig' ) ); + }, + + 'SearchEngineConfig' => function( MediaWikiServices $services ) { + global $wgContLang; + // Create a search engine config from main config. + $config = $services->getService( 'MainConfig' ); + return new SearchEngineConfig( $config, $wgContLang ); + }, + + 'SkinFactory' => function( MediaWikiServices $services ) { + return new SkinFactory(); + }, + /////////////////////////////////////////////////////////////////////////// // NOTE: When adding a service here, don't forget to add a getter function // in the MediaWikiServices class. The convenience getter should just call