23use InvalidArgumentException;
32 private $titleFactory;
47 if ( !$namespaceInfo->
exists( $ns ) ) {
48 throw new InvalidArgumentException(
"Namespace $ns doesn't exist on this wiki" );
50 $this->titleFactory = $titleFactory;
63 return $this->titleFactory->makeTitleSafe( $this->ns, $foreignTitle->
getText() );
68class_alias( NamespaceImportTitleFactory::class,
'NamespaceImportTitleFactory' );