mediawiki-extensions-AbuseF.../includes/AbuseFilterServices.php
Matěj Suchánek 85e000c6ed Add ChangeTagsManager service
This service will be resposnsible for loading
and caching change tags used by abuse filters.

Change-Id: I9a710af1dd1ae58c47de1e8509246ed929d0a662
2020-10-21 16:24:32 +02:00

45 lines
1.2 KiB
PHP

<?php
namespace MediaWiki\Extension\AbuseFilter;
use MediaWiki\MediaWikiServices;
class AbuseFilterServices {
/**
* Conveniency wrapper for strong typing
* @return KeywordsManager
*/
public static function getKeywordsManager() : KeywordsManager {
return MediaWikiServices::getInstance()->getService( KeywordsManager::SERVICE_NAME );
}
/**
* Conveniency wrapper for strong typing
* @return FilterProfiler
*/
public static function getFilterProfiler() : FilterProfiler {
return MediaWikiServices::getInstance()->getService( FilterProfiler::SERVICE_NAME );
}
/**
* @return AbuseFilterPermissionManager
*/
public static function getPermissionManager() : AbuseFilterPermissionManager {
return MediaWikiServices::getInstance()->getService( AbuseFilterPermissionManager::SERVICE_NAME );
}
/**
* @return ChangeTagger
*/
public static function getChangeTagger() : ChangeTagger {
return MediaWikiServices::getInstance()->getService( ChangeTagger::SERVICE_NAME );
}
/**
* @return ChangeTagsManager
*/
public static function getChangeTagsManager() : ChangeTagsManager {
return MediaWikiServices::getInstance()->getService( ChangeTagsManager::SERVICE_NAME );
}
}