Go to the documentation of this file.
48 parent::__construct(
$type );
61 return str_replace(
' ',
'_',
$title );
89 if ( defined(
'MW_PHPUNIT_TEST' ) ) {
96 return $t->getPrefixedText();
98 static $mediaWikiPageNameNormalizer =
null;
100 if ( $mediaWikiPageNameNormalizer ===
null ) {
104 return $mediaWikiPageNameNormalizer->normalizePageName(
131 return parse_url( $this->
getPath( self::PATH_PAGE ), PHP_URL_PATH );
142 return parse_url( $this->
getPath( self::PATH_FILE ), PHP_URL_PATH );
184 if ( $url ===
null ) {
188 if ( $pageName !==
false ) {
189 $pageName = $this->
toDBKey( trim( $pageName ) );
190 $url = str_replace(
'$1',
wfUrlencode( $pageName ), $url );
208 $filePath = $this->
getPath( self::PATH_FILE );
210 if ( $filePath !==
false ) {
211 $filePath = str_replace(
'$1',
$path, $filePath );
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
wfUrlencode( $s)
We want some things to be included as literal characters in our title URLs for prettiness,...
getPath( $pathType)
Returns the path of the provided type or false if there is no such path.
Service for normalizing a page name using a MediaWiki api.
setPath( $pathType, $fullUrl)
Sets the path used to construct links with.
getLinkPath()
Returns the path used to construct links with or false if there is no such path.