mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
2a4f186400
It's all in the code now. These comments don't add anything any more. Change-Id: I66a3723c4fe9ccce989f5b533390d5ce928dc195
48 lines
1.4 KiB
PHP
48 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\Notifications;
|
|
|
|
use MediaWiki\Extension\Notifications\Cache\RevisionLocalCache;
|
|
use MediaWiki\Extension\Notifications\Cache\TitleLocalCache;
|
|
use MediaWiki\Extension\Notifications\Push\NotificationServiceClient;
|
|
use MediaWiki\Extension\Notifications\Push\SubscriptionManager;
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
class Services {
|
|
|
|
/** @var MediaWikiServices */
|
|
private $services;
|
|
|
|
public static function getInstance(): Services {
|
|
return new self( MediaWikiServices::getInstance() );
|
|
}
|
|
|
|
public static function wrap( MediaWikiServices $services ): Services {
|
|
return new self( $services );
|
|
}
|
|
|
|
public function __construct( MediaWikiServices $services ) {
|
|
$this->services = $services;
|
|
}
|
|
|
|
public function getPushNotificationServiceClient(): NotificationServiceClient {
|
|
return $this->services->getService( 'EchoPushNotificationServiceClient' );
|
|
}
|
|
|
|
public function getPushSubscriptionManager(): SubscriptionManager {
|
|
return $this->services->getService( 'EchoPushSubscriptionManager' );
|
|
}
|
|
|
|
public function getAttributeManager(): AttributeManager {
|
|
return $this->services->getService( 'EchoAttributeManager' );
|
|
}
|
|
|
|
public function getTitleLocalCache(): TitleLocalCache {
|
|
return $this->services->getService( 'EchoTitleLocalCache' );
|
|
}
|
|
|
|
public function getRevisionLocalCache(): RevisionLocalCache {
|
|
return $this->services->getService( 'EchoRevisionLocalCache' );
|
|
}
|
|
}
|