9use InvalidArgumentException;
18 private Title $rootPage;
31 throw new InvalidArgumentException(
"The root page you specified, $rootPage, is in a " .
32 "namespace where subpages are not allowed" );
34 $this->titleFactory = $titleFactory;
35 $this->rootPage = $rootPage;
47 return $this->titleFactory->newFromText(
48 $this->rootPage->getPrefixedDBkey() .
'/' . $foreignTitle->
getFullText()
54class_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)