46 parent::__construct(
$type );
57 return str_replace(
' ',
'_', $title );
86 if ( defined(
'MW_PHPUNIT_TEST' ) || defined(
'MW_DEV_ENV' ) ) {
92 $t = Title::newFromText( $pageName );
93 return $t->getPrefixedText();
95 static $mediaWikiPageNameNormalizer =
null;
98 return $mediaWikiPageNameNormalizer->normalizePageName(
127 return parse_url( $this->
getPath( self::PATH_PAGE ), PHP_URL_PATH );
137 return parse_url( $this->
getPath( self::PATH_FILE ), PHP_URL_PATH );
176 if (
$url ===
null ) {
180 if ( $pageName !==
false ) {
181 $pageName = $this->
toDBKey( trim( $pageName ) );
201 $filePath = $this->
getPath( self::PATH_FILE );
202 if ( $filePath ===
null ) {
203 throw new RuntimeException(
"getFileUrl called for {$this->getGlobalId()} while PATH_FILE is unset" );
206 if (
$path !==
false ) {
207 $filePath = str_replace(
'$1',
$path, $filePath );
209 wfDeprecatedMsg( __METHOD__ .
': omitting $path is deprecated',
'1.40' );
217class_alias( MediaWikiSite::class,
'MediaWikiSite' );
wfUrlencode( $s)
We want some things to be included as literal characters in our title URLs for prettiness,...
wfDeprecatedMsg( $msg, $version=false, $component=false, $callerOffset=2)
Log a deprecation warning with arbitrary message text.
Service for normalizing a page name via a MediaWiki action API.