2020-01-15 16:08:53 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\AbuseFilter;
|
|
|
|
|
2020-11-26 15:23:22 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\ChangeTags\ChangeTagger;
|
|
|
|
use MediaWiki\Extension\AbuseFilter\ChangeTags\ChangeTagsManager;
|
|
|
|
use MediaWiki\Extension\AbuseFilter\ChangeTags\ChangeTagValidator;
|
2019-12-16 16:19:48 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\Parser\ParserFactory;
|
2020-11-19 15:32:39 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\Watcher\EmergencyWatcher;
|
2020-11-28 23:53:42 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\Watcher\UpdateHitCountWatcher;
|
2020-01-15 16:08:53 +00:00
|
|
|
use MediaWiki\MediaWikiServices;
|
|
|
|
|
|
|
|
class AbuseFilterServices {
|
2020-09-19 09:45:25 +00:00
|
|
|
|
2020-01-15 16:08:53 +00:00
|
|
|
/**
|
|
|
|
* @return KeywordsManager
|
|
|
|
*/
|
|
|
|
public static function getKeywordsManager() : KeywordsManager {
|
|
|
|
return MediaWikiServices::getInstance()->getService( KeywordsManager::SERVICE_NAME );
|
|
|
|
}
|
2020-09-20 22:31:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @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
|
|
|
|
2020-11-06 12:13:02 +00:00
|
|
|
/**
|
|
|
|
* @return ChangeTagValidator
|
|
|
|
*/
|
|
|
|
public static function getChangeTagValidator() : ChangeTagValidator {
|
|
|
|
return MediaWikiServices::getInstance()->getService( ChangeTagValidator::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
|
|
|
|
2020-09-19 09:45:25 +00:00
|
|
|
/**
|
|
|
|
* @return EmergencyWatcher
|
|
|
|
*/
|
|
|
|
public static function getEmergencyWatcher() : EmergencyWatcher {
|
|
|
|
return MediaWikiServices::getInstance()->getService( EmergencyWatcher::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-10-15 22:00:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return FilterImporter
|
|
|
|
*/
|
|
|
|
public static function getFilterImporter() : FilterImporter {
|
|
|
|
return MediaWikiServices::getInstance()->getService( FilterImporter::SERVICE_NAME );
|
|
|
|
}
|
2020-09-19 22:16:35 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return FilterStore
|
|
|
|
*/
|
|
|
|
public static function getFilterStore() : FilterStore {
|
|
|
|
return MediaWikiServices::getInstance()->getService( FilterStore::SERVICE_NAME );
|
|
|
|
}
|
2020-10-11 21:17:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return ConsequencesFactory
|
|
|
|
*/
|
|
|
|
public static function getConsequencesFactory() : ConsequencesFactory {
|
|
|
|
return MediaWikiServices::getInstance()->getService( ConsequencesFactory::SERVICE_NAME );
|
|
|
|
}
|
2020-11-24 12:16:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return EditBoxBuilderFactory
|
|
|
|
*/
|
|
|
|
public static function getEditBoxBuilderFactory() : EditBoxBuilderFactory {
|
|
|
|
return MediaWikiServices::getInstance()->getService( EditBoxBuilderFactory::SERVICE_NAME );
|
|
|
|
}
|
2020-10-17 11:50:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return ConsequencesLookup
|
|
|
|
*/
|
|
|
|
public static function getConsequencesLookup() : ConsequencesLookup {
|
|
|
|
return MediaWikiServices::getInstance()->getService( ConsequencesLookup::SERVICE_NAME );
|
|
|
|
}
|
2020-10-24 11:58:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return AbuseLoggerFactory
|
|
|
|
*/
|
|
|
|
public static function getAbuseLoggerFactory() : AbuseLoggerFactory {
|
|
|
|
return MediaWikiServices::getInstance()->getService( AbuseLoggerFactory::SERVICE_NAME );
|
|
|
|
}
|
2020-11-28 23:53:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return UpdateHitCountWatcher
|
|
|
|
*/
|
|
|
|
public static function getUpdateHitCountWatcher() : UpdateHitCountWatcher {
|
|
|
|
return MediaWikiServices::getInstance()->getService( UpdateHitCountWatcher::SERVICE_NAME );
|
|
|
|
}
|
2020-01-15 16:08:53 +00:00
|
|
|
}
|