config = $config; $this->lbFactory = $lbFactory; $this->namespaceInfo = $namespaceInfo; $this->watchedItemStore = $watchedItemStore; $this->repoGroup = $repoGroup; $this->readOnlyMode = $readOnlyMode; $this->contentHandlerFactory = $contentHandlerFactory; $this->revisionStore = $revisionStore; $this->spamChecker = $spamChecker; $this->titleFormatter = $titleFormatter; $this->hookContainer = $hookContainer; $this->wikiPageFactory = $wikiPageFactory; $this->userFactory = $userFactory; $this->actorMigration = $actorMigration; $this->actorNormalization = $actorNormalization; $this->titleFactory = $titleFactory; $this->userEditTracker = $userEditTracker; $this->collationFactory = $collationFactory; $this->jobQueueGroup = $jobQueueGroup; $this->commentStore = $commentStore; $this->dbReplicatedCache = $dbReplicatedCache; $this->localWikiID = $localWikiID; $this->webRequestID = $webRequestID; $this->backlinkCacheFactory = $backlinkCacheFactory; $this->undeletePageLogger = $undeletePageLogger; $this->pageUpdaterFactory = $pageUpdaterFactory; } /** * @param Authority $performer * @param WikiPage $wikipage * @param string $newContentModel * @return ContentModelChange */ public function newContentModelChange( Authority $performer, WikiPage $wikipage, string $newContentModel ): ContentModelChange { return new ContentModelChange( $this->contentHandlerFactory, $this->hookContainer, $this->revisionStore, $this->userFactory, $performer, $wikipage, $newContentModel ); } /** * @inheritDoc */ public function newDeletePage( ProperPageIdentity $page, Authority $deleter ): DeletePage { return new DeletePage( $this->hookContainer, $this->revisionStore, $this->lbFactory, $this->jobQueueGroup, $this->commentStore, new ServiceOptions( DeletePage::CONSTRUCTOR_OPTIONS, $this->config ), $this->dbReplicatedCache, $this->localWikiID, $this->webRequestID, $this->wikiPageFactory, $this->userFactory, $page, $deleter, $this->backlinkCacheFactory ); } /** * @param PageIdentity $source * @param PageIdentity $destination * @param string|null $timestamp * @return MergeHistory */ public function newMergeHistory( PageIdentity $source, PageIdentity $destination, string $timestamp = null ): MergeHistory { return new MergeHistory( $source, $destination, $timestamp, $this->lbFactory->getMainLB(), $this->contentHandlerFactory, $this->revisionStore, $this->watchedItemStore, $this->spamChecker, $this->hookContainer, $this->wikiPageFactory, $this->titleFormatter, $this->titleFactory ); } /** * @param Title $from * @param Title $to * @return MovePage */ public function newMovePage( Title $from, Title $to ): MovePage { return new MovePage( $from, $to, new ServiceOptions( MovePage::CONSTRUCTOR_OPTIONS, $this->config ), $this->lbFactory->getMainLB(), $this->namespaceInfo, $this->watchedItemStore, $this->repoGroup, $this->contentHandlerFactory, $this->revisionStore, $this->spamChecker, $this->hookContainer, $this->wikiPageFactory, $this->userFactory, $this->userEditTracker, $this, $this->collationFactory, $this->pageUpdaterFactory ); } /** * Create a new command instance for page rollback. * * @param PageIdentity $page * @param Authority $performer * @param UserIdentity $byUser * @return RollbackPage */ public function newRollbackPage( PageIdentity $page, Authority $performer, UserIdentity $byUser ): RollbackPage { return new RollbackPage( new ServiceOptions( RollbackPage::CONSTRUCTOR_OPTIONS, $this->config ), $this->lbFactory->getMainLB(), $this->userFactory, $this->readOnlyMode, $this->revisionStore, $this->titleFormatter, $this->hookContainer, $this->wikiPageFactory, $this->actorMigration, $this->actorNormalization, $page, $performer, $byUser ); } /** * @inheritDoc */ public function newUndeletePage( ProperPageIdentity $page, Authority $authority ): UndeletePage { return new UndeletePage( $this->hookContainer, $this->jobQueueGroup, $this->lbFactory->getMainLB(), $this->readOnlyMode, $this->repoGroup, $this->undeletePageLogger, $this->revisionStore, $this->userFactory, $this->wikiPageFactory, $page, $authority, $this->pageUpdaterFactory ); } }