*/
class Title implements LinkTarget, IDBAccessObject {
/** @var MapCacheLRU */
- static private $titleCache = null;
+ private static $titleCache = null;
/**
* Title::newFromText maintains a cache to avoid expensive re-normalization of
}
/**
- * @access protected
+ * @protected
*/
function __construct() {
}
return $name;
}
- /**
- * Escape a text fragment, say from a link, for a URL
- *
- * @deprecated since 1.30, use Sanitizer::escapeIdForLink() or escapeIdForExternalInterwiki()
- *
- * @param string $fragment Containing a URL or link fragment (after the "#")
- * @return string Escaped string
- */
- static function escapeFragmentForURL( $fragment ) {
- wfDeprecated( __METHOD__, '1.30' );
- # Note that we don't urlencode the fragment. urlencoded Unicode
- # fragments appear not to work in IE (at least up to 7) or in at least
- # one version of Opera 9.x. The W3C validator, for one, doesn't seem
- # to care if they aren't encoded.
- return Sanitizer::escapeId( $fragment, 'noninitial' );
- }
-
/**
* Callback for usort() to do title sorts by (namespace, title)
*
getNsText( MWNamespace::getTalk( $this->mNamespace ) );
}
- /**
- * Can this title have a corresponding talk page?
- *
- * @deprecated since 1.30, use canHaveTalkPage() instead.
- *
- * @return bool True if this title either is a talk page or can have a talk page associated.
- */
- public function canTalk() {
- return $this->canHaveTalkPage();
- }
-
/**
* Can this title have a corresponding talk page?
*
);
}
- /**
- * @return bool
- * @deprecated Since 1.31; use ::isSiteConfigPage() instead (which also checks for JSON pages)
- */
- public function isCssOrJsPage() {
- wfDeprecated( __METHOD__, '1.31' );
- return ( NS_MEDIAWIKI == $this->mNamespace
- && ( $this->hasContentModel( CONTENT_MODEL_CSS )
- || $this->hasContentModel( CONTENT_MODEL_JAVASCRIPT ) ) );
- }
-
/**
* Is this a "config" (.css, .json, or .js) sub-page of a user page?
*
);
}
- /**
- * @return bool
- * @deprecated Since 1.31; use ::isUserConfigPage() instead (which also checks for JSON pages)
- */
- public function isCssJsSubpage() {
- wfDeprecated( __METHOD__, '1.31' );
- return ( NS_USER == $this->mNamespace && $this->isSubpage()
- && ( $this->hasContentModel( CONTENT_MODEL_CSS )
- || $this->hasContentModel( CONTENT_MODEL_JAVASCRIPT ) ) );
- }
-
/**
* Trim down a .css, .json, or .js subpage title to get the corresponding skin name
*
return substr( $subpage, 0, $lastdot );
}
- /**
- * @deprecated Since 1.31; use ::getSkinFromConfigSubpage() instead
- * @return string Containing skin name from .css, .json, or .js subpage title
- */
- public function getSkinFromCssJsSubpage() {
- wfDeprecated( __METHOD__, '1.31' );
- return $this->getSkinFromConfigSubpage();
- }
-
/**
* Is this a CSS "config" sub-page of a user page?
*
);
}
- /**
- * @deprecated Since 1.31; use ::isUserCssConfigPage()
- * @return bool
- */
- public function isCssSubpage() {
- wfDeprecated( __METHOD__, '1.31' );
- return $this->isUserCssConfigPage();
- }
-
/**
* Is this a JSON "config" sub-page of a user page?
*
);
}
- /**
- * @deprecated Since 1.31; use ::isUserJsConfigPage()
- * @return bool
- */
- public function isJsSubpage() {
- wfDeprecated( __METHOD__, '1.31' );
- return $this->isUserJsConfigPage();
- }
-
/**
* Is this a sitewide CSS "config" page?
*
return $urls;
}
- /**
- * @deprecated since 1.27 use getCdnUrls()
- */
- public function getSquidURLs() {
- return $this->getCdnUrls();
- }
-
/**
* Purge all applicable CDN URLs
*/