mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 14:13:54 +00:00
1445d5962a
This service is responsible for the blockautopromote feature: (un)block autopromotion and check status. The patch mostly moves code from static methods to the new class and relaxes type hints (e.g. from User to UserIdentity). Change-Id: I79a72377881cf06717931cd09af12f3b8e5f3e3f
52 lines
1.4 KiB
PHP
52 lines
1.4 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 );
|
|
}
|
|
|
|
/**
|
|
* @return BlockAutopromoteStore
|
|
*/
|
|
public static function getBlockAutopromoteStore() : BlockAutopromoteStore {
|
|
return MediaWikiServices::getInstance()->getService( BlockAutopromoteStore::SERVICE_NAME );
|
|
}
|
|
}
|