23use InvalidArgumentException;
32 private Title $rootPage;
45 throw new InvalidArgumentException(
"The root page you specified, $rootPage, is in a " .
46 "namespace where subpages are not allowed" );
48 $this->titleFactory = $titleFactory;
49 $this->rootPage = $rootPage;
61 return $this->titleFactory->newFromText(
62 $this->rootPage->getPrefixedDBkey() .
'/' . $foreignTitle->
getFullText()
68class_alias( SubpageImportTitleFactory::class,
'SubpageImportTitleFactory' );
A class to convert page titles on a foreign wiki (ForeignTitle objects) into page titles on the local...
createTitleFromForeignTitle(ForeignTitle $foreignTitle)
Determines which local title best corresponds to the given foreign title.
__construct(NamespaceInfo $namespaceInfo, TitleFactory $titleFactory, Title $rootPage)