// mediawiki-1.37.0\includes\parser\CoreParserFunctions.php
public static function fullpagenamee( $parser, $title = null ) {
$t = Title::newFromText( $title );
if ( $t === null || !$t->canHaveTalkPage() ) {
return '';
}
return wfEscapeWikiText( $t->getPrefixedURL() );
}
/** mediawiki-1.37.0\includes\Title.php
* Get the prefixed title with spaces.
* This is the form usually used for display
*
* @return string The prefixed title, with spaces
*/
public function getPrefixedText() {
if ( $this->prefixedText === null ) {
$s = $this->prefix( $this->mTextform );
$s = strtr( $s, '_', ' ' );
$this->prefixedText = $s;
}
return $this->prefixedText;
}
/** mediawiki-1.37.0\includes\Title.php
* @deprecated since 1.37 directly accessing this member,
* use the ::getText() method instead.
* @var string Text form (spaces not underscores) of the main part
*/
public $mTextform = '';
/** mediawiki-1.37.0\includes\Title.php
* Prefix some arbitrary text with the namespace or interwiki prefix
* of this object
*
* @param string $name The text
* @return string The prefixed text
*/
private function prefix( $name ) {
$p = '';
if ( $this->isExternal() ) {
$p = $this->mInterwiki . ':';
}
if ( $this->mNamespace != 0 ) {
$nsText = $this->getNsText();
if ( $nsText === false ) {
// See T165149. Awkward, but better than erroneously linking to the main namespace.
$nsText = MediaWikiServices::getInstance()->getContentLanguage()->
getNsText( NS_SPECIAL ) . ":Badtitle/NS{$this->mNamespace}";
}
$p .= $nsText . ':';
}
return $p . $name;
}