assertRequiredOptions( self::CONSTRUCTOR_OPTIONS ); $this->options = $options; $this->loadBalancer = $loadBalancer; $this->namespaceInfo = $namespaceInfo; $this->watchedItemStore = $watchedItemStore; $this->permissionManager = $permissionManager; $this->repoGroup = $repoGroup; $this->contentHandlerFactory = $contentHandlerFactory; $this->revisionStore = $revisionStore; $this->spamChecker = $spamChecker; $this->hookContainer = $hookContainer; } /** * @param User $user * @param WikiPage $wikipage * @param string $newContentModel * @return ContentModelChange */ public function newContentModelChange( User $user, WikiPage $wikipage, string $newContentModel ) : ContentModelChange { return new ContentModelChange( $this->contentHandlerFactory, $this->hookContainer, $this->permissionManager, $this->revisionStore, $user, $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->permissionManager, $this->contentHandlerFactory, $this->revisionStore, $this->watchedItemStore, $this->spamChecker ); } /** * @param Title $from * @param Title $to * @return MovePage */ public function newMovePage( Title $from, Title $to ) : MovePage { return new MovePage( $from, $to, $this->options, $this->loadBalancer, $this->namespaceInfo, $this->watchedItemStore, $this->permissionManager, $this->repoGroup, $this->contentHandlerFactory, $this->revisionStore, $this->spamChecker, $this->hookContainer ); } }