config = $config; $this->hookContainer = $hookContainer; $this->contentLanguage = $contentLanguage; $this->namespaceInfo = $namespaceInfo; $this->titleFactory = $titleFactory; $this->wikiPageFactory = $wikiPageFactory; $this->uploadRevisionImporter = $uploadRevisionImporter; $this->contentHandlerFactory = $contentHandlerFactory; $this->slotRoleRegistry = $slotRoleRegistry; } /** * @param ImportSource $source * @param Authority|null $performer Authority used for permission checks only (to ensure that * the user performing the import is allowed to edit the pages they're importing). To skip * the checks, use UltimateAuthority. * * When omitted, defaults to the current global user. This behavior is deprecated since 1.42. * * If you want to also log the import actions, see ImportReporter. * @return WikiImporter */ public function getWikiImporter( ImportSource $source, ?Authority $performer = null ): WikiImporter { if ( !$performer ) { wfDeprecated( __METHOD__ . ' without $performer', '1.42' ); $performer = RequestContext::getMain()->getAuthority(); } return new WikiImporter( $source, $performer, $this->config, $this->hookContainer, $this->contentLanguage, $this->namespaceInfo, $this->titleFactory, $this->wikiPageFactory, $this->uploadRevisionImporter, $this->contentHandlerFactory, $this->slotRoleRegistry ); } }