-
Notifications
You must be signed in to change notification settings - Fork 0
/
TimedNotify.wiring.php
47 lines (44 loc) · 1.61 KB
/
TimedNotify.wiring.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* This file is loaded by MediaWiki\MediaWikiServices::getInstance() during the
* bootstrapping of the dependency injection framework.
*
* @file
*/
use MediaWiki\MediaWikiServices;
use TimedNotify\EchoEventCreator;
use TimedNotify\MediaWiki\HookRunner;
use TimedNotify\NotificationRunner;
use TimedNotify\NotifierStore;
use TimedNotify\PushedNotificationBucket;
use TimedNotify\TimedNotifyServices;
return [
"TimedNotify.EchoEventCreator" => static function (): EchoEventCreator {
return new EchoEventCreator();
},
"TimedNotify.HookRunner" => static function ( MediaWikiServices $services ): HookRunner {
return new HookRunner( $services->getHookContainer() );
},
"TimedNotify.NotificationRunner" => static function ( MediaWikiServices $services ): NotificationRunner {
return new NotificationRunner(
TimedNotifyServices::getNotifierStore( $services ),
TimedNotifyServices::getPushedNotificationBucket( $services ),
TimedNotifyServices::getEchoEventCreator( $services ),
$services->getMainConfig()->get( 'TimedNotifyRunRate' )
);
},
"TimedNotify.NotifierStore" => static function ( MediaWikiServices $services ): NotifierStore {
return new NotifierStore(
TimedNotifyServices::getHookRunner( $services ),
$services->getMainConfig()->get( 'TimedNotifyDisabledNotifiers' )
);
},
"TimedNotify.PushedNotificationBucket" => static function (
MediaWikiServices $services
): PushedNotificationBucket {
return new PushedNotificationBucket(
$services->getDBLoadBalancer()->getConnection( DB_PRIMARY ),
$services->getMainConfig()->get( 'TimedNotifyPushedNotificationRetentionDays' )
);
}
];