mediawiki-extensions-Cookie.../includes/ServiceWiring.php
Florian Schmidt 90d2e58096 Move classes into CookieWarning namespace
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
2018-07-19 12:57:52 +02:00

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() );
},
];