2020-01-15 16:08:53 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\AbuseFilter;
|
|
|
|
|
2019-12-16 16:19:48 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\Parser\ParserFactory;
|
2020-01-15 16:08:53 +00:00
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
|
|
|
|
class AbuseFilterServices {
|
|
|
|
/**
|
|
|
|
* Conveniency wrapper for strong typing
|
|
|
|
* @return KeywordsManager
|
|
|
|
*/
|
|
|
|
public static function getKeywordsManager() : KeywordsManager {
|
|
|
|
return MediaWikiServices::getInstance()->getService( KeywordsManager::SERVICE_NAME );
|
|
|
|
}
|
2020-09-20 22:31:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Conveniency wrapper for strong typing
|
|
|
|
* @return FilterProfiler
|
|
|
|
*/
|
|
|
|
public static function getFilterProfiler() : FilterProfiler {
|
|
|
|
return MediaWikiServices::getInstance()->getService( FilterProfiler::SERVICE_NAME );
|
|
|
|
}
|
2020-09-18 14:49:13 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return AbuseFilterPermissionManager
|
|
|
|
*/
|
|
|
|
public static function getPermissionManager() : AbuseFilterPermissionManager {
|
|
|
|
return MediaWikiServices::getInstance()->getService( AbuseFilterPermissionManager::SERVICE_NAME );
|
|
|
|
}
|
2020-10-13 16:01:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return ChangeTagger
|
|
|
|
*/
|
|
|
|
public static function getChangeTagger() : ChangeTagger {
|
|
|
|
return MediaWikiServices::getInstance()->getService( ChangeTagger::SERVICE_NAME );
|
|
|
|
}
|
2020-10-14 14:21:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return ChangeTagsManager
|
|
|
|
*/
|
|
|
|
public static function getChangeTagsManager() : ChangeTagsManager {
|
|
|
|
return MediaWikiServices::getInstance()->getService( ChangeTagsManager::SERVICE_NAME );
|
|
|
|
}
|
2020-10-21 14:18:08 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return BlockAutopromoteStore
|
|
|
|
*/
|
|
|
|
public static function getBlockAutopromoteStore() : BlockAutopromoteStore {
|
|
|
|
return MediaWikiServices::getInstance()->getService( BlockAutopromoteStore::SERVICE_NAME );
|
|
|
|
}
|
2020-10-25 15:30:43 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return FilterUser
|
|
|
|
*/
|
|
|
|
public static function getFilterUser() : FilterUser {
|
|
|
|
return MediaWikiServices::getInstance()->getService( FilterUser::SERVICE_NAME );
|
|
|
|
}
|
2020-10-16 22:29:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return CentralDBManager
|
|
|
|
*/
|
|
|
|
public static function getCentralDBManager() : CentralDBManager {
|
|
|
|
return MediaWikiServices::getInstance()->getService( CentralDBManager::SERVICE_NAME );
|
|
|
|
}
|
2019-12-16 16:19:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return ParserFactory
|
|
|
|
*/
|
|
|
|
public static function getParserFactory() : ParserFactory {
|
|
|
|
return MediaWikiServices::getInstance()->getService( ParserFactory::SERVICE_NAME );
|
|
|
|
}
|
2020-09-20 11:30:59 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return FilterLookup
|
|
|
|
*/
|
|
|
|
public static function getFilterLookup() : FilterLookup {
|
|
|
|
return MediaWikiServices::getInstance()->getService( FilterLookup::SERVICE_NAME );
|
|
|
|
}
|
2020-10-10 17:20:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return FilterValidator
|
|
|
|
*/
|
|
|
|
public static function getFilterValidator() : FilterValidator {
|
|
|
|
return MediaWikiServices::getInstance()->getService( FilterValidator::SERVICE_NAME );
|
|
|
|
}
|
2020-11-07 11:40:26 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return FilterCompare
|
|
|
|
*/
|
|
|
|
public static function getFilterCompare() : FilterCompare {
|
|
|
|
return MediaWikiServices::getInstance()->getService( FilterCompare::SERVICE_NAME );
|
|
|
|
}
|
2020-01-15 16:08:53 +00:00
|
|
|
}
|