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
|
|
|
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getHookRunner( ?ContainerInterface $services = null ): AbuseFilterHookRunner {
|
2023-06-14 15:30:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getKeywordsManager( ?ContainerInterface $services = null ): KeywordsManager {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getFilterProfiler( ?ContainerInterface $services = null ): FilterProfiler {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getPermissionManager( ?ContainerInterface $services = null ): AbuseFilterPermissionManager {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getChangeTagger( ?ContainerInterface $services = null ): ChangeTagger {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getChangeTagsManager( ?ContainerInterface $services = null ): ChangeTagsManager {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getChangeTagValidator( ?ContainerInterface $services = null ): ChangeTagValidator {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getBlockAutopromoteStore( ?ContainerInterface $services = null ): BlockAutopromoteStore {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getFilterUser( ?ContainerInterface $services = null ): FilterUser {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getCentralDBManager( ?ContainerInterface $services = null ): CentralDBManager {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getRuleCheckerFactory( ?ContainerInterface $services = null ): RuleCheckerFactory {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getFilterLookup( ?ContainerInterface $services = null ): FilterLookup {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getEmergencyCache( ?ContainerInterface $services = null ): EmergencyCache {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getEmergencyWatcher( ?ContainerInterface $services = null ): EmergencyWatcher {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getEchoNotifier( ?ContainerInterface $services = null ): EchoNotifier {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getFilterValidator( ?ContainerInterface $services = null ): FilterValidator {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getFilterCompare( ?ContainerInterface $services = null ): FilterCompare {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getFilterImporter( ?ContainerInterface $services = null ): FilterImporter {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getFilterStore( ?ContainerInterface $services = null ): FilterStore {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getConsequencesFactory( ?ContainerInterface $services = null ): ConsequencesFactory {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getEditBoxBuilderFactory( ?ContainerInterface $services = null ): EditBoxBuilderFactory {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getConsequencesLookup( ?ContainerInterface $services = null ): ConsequencesLookup {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getConsequencesRegistry( ?ContainerInterface $services = null ): ConsequencesRegistry {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getAbuseLoggerFactory( ?ContainerInterface $services = null ): AbuseLoggerFactory {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getUpdateHitCountWatcher( ?ContainerInterface $services = null ): UpdateHitCountWatcher {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getVariablesBlobStore( ?ContainerInterface $services = null ): VariablesBlobStore {
|
2023-03-27 16:43:06 +00:00
|
|
|
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(
|
2024-10-26 12:37:16 +00:00
|
|
|
?ContainerInterface $services = null
|
2023-03-27 16:43:06 +00:00
|
|
|
): 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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getFilterRunnerFactory( ?ContainerInterface $services = null ): FilterRunnerFactory {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getSpecsFormatter( ?ContainerInterface $services = null ): SpecsFormatter {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getVariablesFormatter( ?ContainerInterface $services = null ): VariablesFormatter {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getLazyVariableComputer( ?ContainerInterface $services = null ): LazyVariableComputer {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getTextExtractor( ?ContainerInterface $services = null ): TextExtractor {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getVariablesManager( ?ContainerInterface $services = null ): VariablesManager {
|
2023-03-27 16:43:06 +00:00
|
|
|
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(
|
2024-10-26 12:37:16 +00:00
|
|
|
?ContainerInterface $services = null
|
2023-03-27 16:43:06 +00:00
|
|
|
): 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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getEditRevUpdater( ?ContainerInterface $services = null ): EditRevUpdater {
|
2023-03-27 16:43:06 +00:00
|
|
|
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
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getBlockedDomainStorage( ?ContainerInterface $services = null ): BlockedDomainStorage {
|
2023-05-24 20:09:59 +00:00
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( BlockedDomainStorage::SERVICE_NAME );
|
|
|
|
}
|
2023-08-06 11:44:16 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param ContainerInterface|null $services
|
|
|
|
* @return BlockedDomainFilter
|
|
|
|
*/
|
2024-10-26 12:37:16 +00:00
|
|
|
public static function getBlockedDomainFilter( ?ContainerInterface $services = null ): BlockedDomainFilter {
|
2023-08-06 11:44:16 +00:00
|
|
|
return ( $services ?? MediaWikiServices::getInstance() )->get( BlockedDomainFilter::SERVICE_NAME );
|
|
|
|
}
|
2020-01-15 16:08:53 +00:00
|
|
|
}
|