23use InvalidArgumentException;
32 private $titleFactory;
48 throw new InvalidArgumentException(
"The root page you specified, $rootPage, is in a " .
49 "namespace where subpages are not allowed" );
51 $this->titleFactory = $titleFactory;
52 $this->rootPage = $rootPage;
64 return $this->titleFactory->newFromText(
65 $this->rootPage->getPrefixedDBkey() .
'/' . $foreignTitle->
getFullText()
71class_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)