45 $pieces = explode(
':',
$title, 2 );
59 $isNamespacePartValid = $ns ===
null
60 ? MediaWikiServices::getInstance()->getContentLanguage()->getNsIndex( $pieces[0] ) !==
64 if ( count( $pieces ) === 2 && $isNamespacePartValid ) {
65 list( $namespaceName, $pageName ) = $pieces;
71 return new ForeignTitle( $ns, $namespaceName, $pageName );