mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-28 01:10:04 +00:00
13015ad317
E.g. type hints that have been missing, missing indention, and such. Change-Id: I34610a03ad69d7988e9976a08a289c64121420ca
48 lines
1.4 KiB
PHP
48 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 $serivces ) {
|
|
$factory = new EventLoggerFactory(
|
|
$serivces->getService( 'Popups.Config' ),
|
|
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' )
|
|
);
|
|
}
|
|
];
|