* Factory method for loading a skin of a given type
* @param string $key 'monobook', 'vector', etc.
* @return Skin
- * @deprecated Use SkinFactory instead
+ * @deprecated since 1.24; Use SkinFactory instead
*/
static function &newFromKey( $key ) {
wfDeprecated( __METHOD__, '1.24' );
- global $wgFallbackSkin;
$key = Skin::normalizeKey( $key );
$factory = SkinFactory::getDefaultInstance();
- try {
- $skin = $factory->makeSkin( $key );
- } catch ( SkinException $e ) {
- $skin = $factory->makeSkin( $wgFallbackSkin );
- }
+ // normalizeKey() guarantees that a skin with this key will exist.
+ $skin = $factory->makeSkin( $key );
return $skin;
}
return "$numeric $type $name";
}
- /*
+ /**
* Return values for <html> element
- * @return array of associative name-to-value elements for <html> element
+ * @return array Array of associative name-to-value elements for <html> element
*/
public function getHtmlElementAttributes() {
$lang = $this->getLanguage();