38 private $contentLanguage;
41 private $namespaceInfo;
44 private $titleFactory;
56 $this->contentLanguage = $contentLanguage;
57 $this->namespaceInfo = $namespaceInfo;
58 $this->titleFactory = $titleFactory;
77 $this->namespaceInfo->exists( $foreignNs )
79 return $this->titleFactory->makeTitleSafe( $foreignNs, $foreignTitle->
getText() );
85 $targetNs = $this->contentLanguage->getNsIndex( $foreignTitle->
getNamespaceName() );
86 if ( $targetNs !==
false ) {
87 return $this->titleFactory->makeTitleSafe( $targetNs, $foreignTitle->
getText() );
91 return $this->titleFactory->makeTitleSafe( 0, $foreignTitle->
getFullText() );
96class_alias( NaiveImportTitleFactory::class,
'NaiveImportTitleFactory' );
Base class for language-specific code.