mediawiki-extensions-Popups/includes/ServiceWirings.php
Stephen Niedzielski 7c4836afdf Hygiene: fix typo in ServiceWirings function arg
Change-Id: I4f4ca2f1c1943928475bfcb42092cb26ab7ed712
2019-02-26 15:39:18 -07:00

47 lines
1.4 KiB
PHP

<?php
use MediaWiki\Logger\LoggerFactory;
use MediaWiki\MediaWikiServices;
use Popups\EventLogging\EventLoggerFactory;
use Popups\PopupsContext;
use Popups\PopupsGadgetsIntegration;
use Popups\UserPreferencesChangeHandler;
/**
* @codeCoverageIgnore
*/
return [
'Popups.Config' => function ( MediaWikiServices $services ) {
return $services->getService( 'ConfigFactory' )
->makeConfig( PopupsContext::EXTENSION_NAME );
},
'Popups.GadgetsIntegration' => function ( MediaWikiServices $services ) {
return new PopupsGadgetsIntegration(
$services->getService( 'Popups.Config' ),
ExtensionRegistry::getInstance()
);
},
'Popups.EventLogger' => function ( MediaWikiServices $services ) {
$factory = new EventLoggerFactory(
ExtensionRegistry::getInstance()
);
return $factory->get();
},
'Popups.UserPreferencesChangeHandler' => function ( MediaWikiServices $services ) {
return new UserPreferencesChangeHandler(
$services->getService( 'Popups.Context' )
);
},
'Popups.Logger' => function ( MediaWikiServices $services ) {
return LoggerFactory::getInstance( PopupsContext::LOGGER_CHANNEL );
},
'Popups.Context' => function ( MediaWikiServices $services ) {
return new PopupsContext(
$services->getService( 'Popups.Config' ),
ExtensionRegistry::getInstance(),
$services->getService( 'Popups.GadgetsIntegration' ),
$services->getService( 'Popups.EventLogger' )
);
}
];