MediaWiki REL1_34
ServiceWiring.php
Go to the documentation of this file.
1<?php
2
5use \MediaWiki\Extension\OATHAuth\OATHUserRepository;
6
7return [
8 'OATHAuth' => function ( MediaWikiServices $services ) {
9 return new OATHAuth(
10 $services->getMainConfig(),
11 $services->getDBLoadBalancerFactory()
12 );
13 },
14 'OATHUserRepository' => function ( MediaWikiServices $services ) {
15 global $wgOATHAuthDatabase;
16 $auth = $services->getService( 'OATHAuth' );
17 return new OATHUserRepository(
18 $services->getDBLoadBalancerFactory()->getMainLB( $wgOATHAuthDatabase ),
19 new \HashBagOStuff( [
20 'maxKey' => 5
21 ] ),
22 $auth
23 );
24 }
25];
Simple store for keeping values in an associative array for the current process.
MediaWikiServices is the service locator for the application scope of MediaWiki.