hookRunner = $hookRunner; $this->filterProfiler = $filterProfiler; $this->changeTagger = $changeTagger; $this->filterLookup = $filterLookup; $this->ruleCheckerFactory = $ruleCheckerFactory; $this->consExecutorFactory = $consExecutorFactory; $this->abuseLoggerFactory = $abuseLoggerFactory; $this->varManager = $varManager; $this->varGeneratorFactory = $varGeneratorFactory; $this->emergencyCache = $emergencyCache; $this->updateHitCountWatcher = $updateHitCountWatcher; $this->emergencyWatcher = $emergencyWatcher; $this->localCache = $localCache; $this->logger = $logger; $this->editStashLogger = $editStashLogger; $this->statsdDataFactory = $statsdDataFactory; $this->options = $options; } /** * @param User $user * @param Title $title * @param VariableHolder $vars * @param string $group * @return FilterRunner */ public function newRunner( User $user, Title $title, VariableHolder $vars, string $group ): FilterRunner { // TODO Add a method to this class taking these as params? Add a hook for custom watchers $watchers = [ $this->updateHitCountWatcher, $this->emergencyWatcher ]; return new FilterRunner( $this->hookRunner, $this->filterProfiler, $this->changeTagger, $this->filterLookup, $this->ruleCheckerFactory, $this->consExecutorFactory, $this->abuseLoggerFactory, $this->varManager, $this->varGeneratorFactory, $this->emergencyCache, $watchers, new EditStashCache( $this->localCache, // Bots do not use edit stashing, so avoid distorting the stats $user->isBot() ? new NullStatsdDataFactory() : $this->statsdDataFactory, $this->varManager, $this->editStashLogger, $title, $group ), $this->logger, $this->options, $user, $title, $vars, $group ); } }