config = $config; $this->loadBalancer = $loadBalancer; $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; } /** * @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 ); } /** * @param Title $source * @param Title $destination * @param string|null $timestamp * @return MergeHistory */ public function newMergeHistory( Title $source, Title $destination, string $timestamp = null ) : MergeHistory { if ( $timestamp === null ) { // For compatibility with MergeHistory constructor until it can be changed $timestamp = false; } return new MergeHistory( $source, $destination, $timestamp, $this->loadBalancer, $this->contentHandlerFactory, $this->revisionStore, $this->watchedItemStore, $this->spamChecker, $this->hookContainer, $this->wikiPageFactory ); } /** * @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->loadBalancer, $this->namespaceInfo, $this->watchedItemStore, $this->repoGroup, $this->contentHandlerFactory, $this->revisionStore, $this->spamChecker, $this->hookContainer, $this->wikiPageFactory, $this->userFactory ); } /** * 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->loadBalancer, $this->userFactory, $this->readOnlyMode, $this->revisionStore, $this->titleFormatter, $this->hookContainer, $this->wikiPageFactory, $this->actorMigration, $this->actorNormalization, $page, $performer, $byUser ); } }