mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-15 02:03:53 +00:00
2026e3ac3a
This service should act as a mediator between the AF code and the permission manager, and it should know what are the permissions required by each action. Change-Id: Ieb177d9992147b11fa7b8f05929da6c182cc2286
31 lines
820 B
PHP
31 lines
820 B
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 );
|
|
}
|
|
}
|