mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CookieWarning
synced 2024-11-23 22:03:41 +00:00
90d2e58096
This should make the code a bit more structured and easier to navigate through. It also removes some lines from extension.json as the autoload classes list is replaced by an autoload namespaces property. This also changes the minimum requirement of MediaWiki to 1.31 for this extension to work. Change-Id: I249ccc3035297c99202a5f83fcc8d3fda68b682c
20 lines
646 B
PHP
20 lines
646 B
PHP
<?php
|
|
|
|
use CookieWarning\Decisions;
|
|
use CookieWarning\GeoLocation;
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
return [
|
|
'CookieWarning.Config' => function ( MediaWikiServices $services ) {
|
|
return $services->getService( 'ConfigFactory' )
|
|
->makeConfig( 'cookiewarning' );
|
|
},
|
|
'GeoLocation' => function ( MediaWikiServices $services ) {
|
|
return new GeoLocation( $services->getService( 'CookieWarning.Config' ) );
|
|
},
|
|
'CookieWarning.Decisions' => function ( MediaWikiServices $services ) {
|
|
return new Decisions( $services->getService( 'CookieWarning.Config' ),
|
|
$services->getService( 'GeoLocation' ), $services->getMainWANObjectCache() );
|
|
},
|
|
];
|