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;
|
2020-12-18 14:05:33 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\Consequences\ConsequencesExecutorFactory;
|
|
|
|
use MediaWiki\Extension\AbuseFilter\Consequences\ConsequencesFactory;
|
|
|
|
use MediaWiki\Extension\AbuseFilter\Consequences\ConsequencesLookup;
|
|
|
|
use MediaWiki\Extension\AbuseFilter\Consequences\ConsequencesRegistry;
|
2021-02-01 15:47:46 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\EditBox\EditBoxBuilderFactory;
|
2023-06-14 15:30:06 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\Hooks\AbuseFilterHookRunner;
|
2021-09-01 11:53:38 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\Parser\RuleCheckerFactory;
|
2021-01-03 13:10:20 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\VariableGenerator\VariableGeneratorFactory;
|
2021-01-02 13:41:31 +00:00
|
|
|
use MediaWiki\Extension\AbuseFilter\Variables\LazyVariableComputer;
|
|
|
|
use MediaWiki\Extension\AbuseFilter\Variables\VariablesBlobStore;
|
|
|
|
use MediaWiki\Extension\AbuseFilter\Variables\VariablesFormatter;
|
|
|
|
use MediaWiki\Extension\AbuseFilter\Variables\VariablesManager;
|
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;
|
2023-03-27 16:43:06 +00:00
|
|
|
use Psr\Container\ContainerInterface;
|
2020-01-15 16:08:53 +00:00
|
|
|
|
|
|
|
class AbuseFilterServices {
|
2020-09-19 09:45:25 +00:00
|
|
|
|
2023-06-14 15:30:06 +00:00
|
|
|
public static function getHookRunner( ContainerInterface $services = null ): AbuseFilterHookRunner {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( AbuseFilterHookRunner::SERVICE_NAME );
|
|
|
|
}
|
|
|
|
|
2020-01-15 16:08:53 +00:00
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-01-15 16:08:53 +00:00
|
|
|
* @return KeywordsManager
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getKeywordsManager( ContainerInterface $services = null ): KeywordsManager {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( KeywordsManager::SERVICE_NAME );
|
2020-01-15 16:08:53 +00:00
|
|
|
}
|
2020-09-20 22:31:41 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-09-20 22:31:41 +00:00
|
|
|
* @return FilterProfiler
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getFilterProfiler( ContainerInterface $services = null ): FilterProfiler {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( FilterProfiler::SERVICE_NAME );
|
2020-09-20 22:31:41 +00:00
|
|
|
}
|
2020-09-18 14:49:13 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-09-18 14:49:13 +00:00
|
|
|
* @return AbuseFilterPermissionManager
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getPermissionManager( ContainerInterface $services = null ): AbuseFilterPermissionManager {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( AbuseFilterPermissionManager::SERVICE_NAME );
|
2020-09-18 14:49:13 +00:00
|
|
|
}
|
2020-10-13 16:01:18 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-13 16:01:18 +00:00
|
|
|
* @return ChangeTagger
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getChangeTagger( ContainerInterface $services = null ): ChangeTagger {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( ChangeTagger::SERVICE_NAME );
|
2020-10-13 16:01:18 +00:00
|
|
|
}
|
2020-10-14 14:21:48 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-14 14:21:48 +00:00
|
|
|
* @return ChangeTagsManager
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getChangeTagsManager( ContainerInterface $services = null ): ChangeTagsManager {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( ChangeTagsManager::SERVICE_NAME );
|
2020-10-14 14:21:48 +00:00
|
|
|
}
|
2020-10-21 14:18:08 +00:00
|
|
|
|
2020-11-06 12:13:02 +00:00
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-11-06 12:13:02 +00:00
|
|
|
* @return ChangeTagValidator
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getChangeTagValidator( ContainerInterface $services = null ): ChangeTagValidator {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( ChangeTagValidator::SERVICE_NAME );
|
2020-11-06 12:13:02 +00:00
|
|
|
}
|
|
|
|
|
2020-10-21 14:18:08 +00:00
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-21 14:18:08 +00:00
|
|
|
* @return BlockAutopromoteStore
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getBlockAutopromoteStore( ContainerInterface $services = null ): BlockAutopromoteStore {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( BlockAutopromoteStore::SERVICE_NAME );
|
2020-10-21 14:18:08 +00:00
|
|
|
}
|
2020-10-25 15:30:43 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-25 15:30:43 +00:00
|
|
|
* @return FilterUser
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getFilterUser( ContainerInterface $services = null ): FilterUser {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( FilterUser::SERVICE_NAME );
|
2020-10-25 15:30:43 +00:00
|
|
|
}
|
2020-10-16 22:29:41 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-16 22:29:41 +00:00
|
|
|
* @return CentralDBManager
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getCentralDBManager( ContainerInterface $services = null ): CentralDBManager {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( CentralDBManager::SERVICE_NAME );
|
2020-10-16 22:29:41 +00:00
|
|
|
}
|
2019-12-16 16:19:48 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2021-09-01 11:53:38 +00:00
|
|
|
* @return RuleCheckerFactory
|
2019-12-16 16:19:48 +00:00
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getRuleCheckerFactory( ContainerInterface $services = null ): RuleCheckerFactory {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( RuleCheckerFactory::SERVICE_NAME );
|
2019-12-16 16:19:48 +00:00
|
|
|
}
|
2020-09-20 11:30:59 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-09-20 11:30:59 +00:00
|
|
|
* @return FilterLookup
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getFilterLookup( ContainerInterface $services = null ): FilterLookup {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( FilterLookup::SERVICE_NAME );
|
2020-09-20 11:30:59 +00:00
|
|
|
}
|
2020-10-10 17:20:21 +00:00
|
|
|
|
2021-02-10 13:13:03 +00:00
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2021-02-10 13:13:03 +00:00
|
|
|
* @return EmergencyCache
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getEmergencyCache( ContainerInterface $services = null ): EmergencyCache {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( EmergencyCache::SERVICE_NAME );
|
2021-02-10 13:13:03 +00:00
|
|
|
}
|
|
|
|
|
2020-09-19 09:45:25 +00:00
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-09-19 09:45:25 +00:00
|
|
|
* @return EmergencyWatcher
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getEmergencyWatcher( ContainerInterface $services = null ): EmergencyWatcher {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( EmergencyWatcher::SERVICE_NAME );
|
2020-09-19 09:45:25 +00:00
|
|
|
}
|
|
|
|
|
2020-11-10 12:58:11 +00:00
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-11-10 12:58:11 +00:00
|
|
|
* @return EchoNotifier
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getEchoNotifier( ContainerInterface $services = null ): EchoNotifier {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( EchoNotifier::SERVICE_NAME );
|
2020-11-10 12:58:11 +00:00
|
|
|
}
|
|
|
|
|
2020-10-10 17:20:21 +00:00
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-10 17:20:21 +00:00
|
|
|
* @return FilterValidator
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getFilterValidator( ContainerInterface $services = null ): FilterValidator {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( FilterValidator::SERVICE_NAME );
|
2020-10-10 17:20:21 +00:00
|
|
|
}
|
2020-11-07 11:40:26 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-11-07 11:40:26 +00:00
|
|
|
* @return FilterCompare
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getFilterCompare( ContainerInterface $services = null ): FilterCompare {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( FilterCompare::SERVICE_NAME );
|
2020-11-07 11:40:26 +00:00
|
|
|
}
|
2020-10-15 22:00:32 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-15 22:00:32 +00:00
|
|
|
* @return FilterImporter
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getFilterImporter( ContainerInterface $services = null ): FilterImporter {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( FilterImporter::SERVICE_NAME );
|
2020-10-15 22:00:32 +00:00
|
|
|
}
|
2020-09-19 22:16:35 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-09-19 22:16:35 +00:00
|
|
|
* @return FilterStore
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getFilterStore( ContainerInterface $services = null ): FilterStore {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( FilterStore::SERVICE_NAME );
|
2020-09-19 22:16:35 +00:00
|
|
|
}
|
2020-10-11 21:17:41 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-11 21:17:41 +00:00
|
|
|
* @return ConsequencesFactory
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getConsequencesFactory( ContainerInterface $services = null ): ConsequencesFactory {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( ConsequencesFactory::SERVICE_NAME );
|
2020-10-11 21:17:41 +00:00
|
|
|
}
|
2020-11-24 12:16:41 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-11-24 12:16:41 +00:00
|
|
|
* @return EditBoxBuilderFactory
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getEditBoxBuilderFactory( ContainerInterface $services = null ): EditBoxBuilderFactory {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( EditBoxBuilderFactory::SERVICE_NAME );
|
2020-11-24 12:16:41 +00:00
|
|
|
}
|
2020-10-17 11:50:21 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-17 11:50:21 +00:00
|
|
|
* @return ConsequencesLookup
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getConsequencesLookup( ContainerInterface $services = null ): ConsequencesLookup {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( ConsequencesLookup::SERVICE_NAME );
|
2020-10-17 11:50:21 +00:00
|
|
|
}
|
2020-10-24 11:58:46 +00:00
|
|
|
|
2020-11-29 22:55:34 +00:00
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-11-29 22:55:34 +00:00
|
|
|
* @return ConsequencesRegistry
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getConsequencesRegistry( ContainerInterface $services = null ): ConsequencesRegistry {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( ConsequencesRegistry::SERVICE_NAME );
|
2020-11-29 22:55:34 +00:00
|
|
|
}
|
|
|
|
|
2020-10-24 11:58:46 +00:00
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-24 11:58:46 +00:00
|
|
|
* @return AbuseLoggerFactory
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getAbuseLoggerFactory( ContainerInterface $services = null ): AbuseLoggerFactory {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( AbuseLoggerFactory::SERVICE_NAME );
|
2020-10-24 11:58:46 +00:00
|
|
|
}
|
2020-11-28 23:53:42 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-11-28 23:53:42 +00:00
|
|
|
* @return UpdateHitCountWatcher
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getUpdateHitCountWatcher( ContainerInterface $services = null ): UpdateHitCountWatcher {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( UpdateHitCountWatcher::SERVICE_NAME );
|
2020-11-28 23:53:42 +00:00
|
|
|
}
|
2020-09-29 14:52:05 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-09-29 14:52:05 +00:00
|
|
|
* @return VariablesBlobStore
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getVariablesBlobStore( ContainerInterface $services = null ): VariablesBlobStore {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( VariablesBlobStore::SERVICE_NAME );
|
2020-09-29 14:52:05 +00:00
|
|
|
}
|
2020-10-16 22:10:37 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-16 22:10:37 +00:00
|
|
|
* @return ConsequencesExecutorFactory
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getConsequencesExecutorFactory(
|
|
|
|
ContainerInterface $services = null
|
|
|
|
): ConsequencesExecutorFactory {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( ConsequencesExecutorFactory::SERVICE_NAME );
|
2020-10-16 22:10:37 +00:00
|
|
|
}
|
2020-11-27 14:49:41 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-11-27 14:49:41 +00:00
|
|
|
* @return FilterRunnerFactory
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getFilterRunnerFactory( ContainerInterface $services = null ): FilterRunnerFactory {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( FilterRunnerFactory::SERVICE_NAME );
|
2020-11-27 14:49:41 +00:00
|
|
|
}
|
2020-10-02 15:08:48 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-02 15:08:48 +00:00
|
|
|
* @return SpecsFormatter
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getSpecsFormatter( ContainerInterface $services = null ): SpecsFormatter {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( SpecsFormatter::SERVICE_NAME );
|
2020-10-02 15:08:48 +00:00
|
|
|
}
|
2020-09-25 22:32:01 +00:00
|
|
|
|
2020-12-31 13:29:00 +00:00
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-12-31 13:29:00 +00:00
|
|
|
* @return VariablesFormatter
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getVariablesFormatter( ContainerInterface $services = null ): VariablesFormatter {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( VariablesFormatter::SERVICE_NAME );
|
2020-12-31 13:29:00 +00:00
|
|
|
}
|
|
|
|
|
2020-09-25 22:32:01 +00:00
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-09-25 22:32:01 +00:00
|
|
|
* @return LazyVariableComputer
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getLazyVariableComputer( ContainerInterface $services = null ): LazyVariableComputer {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( LazyVariableComputer::SERVICE_NAME );
|
2020-09-25 22:32:01 +00:00
|
|
|
}
|
2020-09-29 18:48:51 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-09-29 18:48:51 +00:00
|
|
|
* @return TextExtractor
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getTextExtractor( ContainerInterface $services = null ): TextExtractor {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( TextExtractor::SERVICE_NAME );
|
2020-09-29 18:48:51 +00:00
|
|
|
}
|
2020-10-18 22:25:05 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2020-10-18 22:25:05 +00:00
|
|
|
* @return VariablesManager
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getVariablesManager( ContainerInterface $services = null ): VariablesManager {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( VariablesManager::SERVICE_NAME );
|
2020-10-18 22:25:05 +00:00
|
|
|
}
|
2021-01-03 13:10:20 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2021-01-03 13:10:20 +00:00
|
|
|
* @return VariableGeneratorFactory
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getVariableGeneratorFactory(
|
|
|
|
ContainerInterface $services = null
|
|
|
|
): VariableGeneratorFactory {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( VariableGeneratorFactory::SERVICE_NAME );
|
2021-01-03 13:10:20 +00:00
|
|
|
}
|
2021-01-05 13:33:45 +00:00
|
|
|
|
|
|
|
/**
|
2023-03-27 16:43:06 +00:00
|
|
|
* @param ContainerInterface|null $services
|
2021-01-05 13:33:45 +00:00
|
|
|
* @return EditRevUpdater
|
|
|
|
*/
|
2023-03-27 16:43:06 +00:00
|
|
|
public static function getEditRevUpdater( ContainerInterface $services = null ): EditRevUpdater {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( EditRevUpdater::SERVICE_NAME );
|
2021-01-05 13:33:45 +00:00
|
|
|
}
|
2018-03-08 21:16:25 +00:00
|
|
|
|
2023-05-24 20:09:59 +00:00
|
|
|
/**
|
|
|
|
* @param ContainerInterface|null $services
|
|
|
|
* @return BlockedDomainStorage
|
|
|
|
*/
|
|
|
|
public static function getBlockedDomainStorage( ContainerInterface $services = null ): BlockedDomainStorage {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( BlockedDomainStorage::SERVICE_NAME );
|
|
|
|
}
|
2023-08-06 11:44:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param ContainerInterface|null $services
|
|
|
|
* @return BlockedDomainFilter
|
|
|
|
*/
|
|
|
|
public static function getBlockedDomainFilter( ContainerInterface $services = null ): BlockedDomainFilter {
|
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( BlockedDomainFilter::SERVICE_NAME );
|
|
|
|
}
|
2020-01-15 16:08:53 +00:00
|
|
|
}
|