mediawiki-extensions-Echo/includes/Services.php
thiemowmde 2a4f186400 Remove obsolete PHPDoc copies from fully typed constructors
It's all in the code now. These comments don't add anything any
more.

Change-Id: I66a3723c4fe9ccce989f5b533390d5ce928dc195
2024-08-11 18:05:01 +02:00

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' );
}
}