mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-27 17:00:37 +00:00
36935fe1f3
Remove pluralization from the service wiring filename for consistency with similar files in other Web repos. There are multiple services in this file but the point of distinction doesn't seem worthwhile. Change-Id: I6ff4f9caf66a6156f6aa6a8b808f51c356df3414
47 lines
1.4 KiB
PHP
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' )
|
|
);
|
|
}
|
|
];
|