skin = $skin; } /** * @return IContextSource */ public function getContextSource(): IContextSource { return $this->skin->getContext(); } /** * @inheritDoc */ public function getConfig(): Config { return $this->skin->getConfig(); } /** * @inheritDoc */ public function getTitle(): Title { return $this->skin->getTitle() ?? Title::makeTitle( NS_MAIN, 'Foo' ); } /** * @return Title|null the "relevant" title - see Skin::getRelevantTitle */ public function getRelevantTitle() { return $this->skin->getRelevantTitle() ?? $this->getTitle(); } /** * @return OutputPage */ public function getOutput(): OutputPage { return $this->skin->getOutput(); } /** * @return User */ public function getUser() { return $this->skin->getUser(); } /** * @return Language $language */ public function getLanguage() { return $this->skin->getLanguage(); } /** * @return MessageLocalizer */ public function getMessageLocalizer(): MessageLocalizer { if ( $this->localizer === null ) { // Cannot call getContext in constructor, // because Skin::class does not have a context yet. // But it is valid to call it now $this->localizer = $this->skin->getContext(); } return $this->localizer; } /** * @return WikiPage */ public function getWikiPage() { return $this->skin->getWikiPage(); } /** * Temporarily allows access to Skin method. * It exists to support skins overriding the method in MediaWiki 1.40 * (overriding the method is now deprecated) * It can be removed in 1.41 * * @unstable * @internal * @return array */ public function getFooterIcons() { return $this->skin->getFooterIcons(); } /** * Renders a $wgFooterIcons icon according to the method's arguments * It exists to support skins overriding the method in MediaWiki 1.40 * (overriding the method is now deprecated) * It can be removed in 1.41 * * @unstable * @param array $icon The icon to build the html for, see $wgFooterIcons * for the format of this array. * @param bool|string $withImage Whether to use the icon's image or output * a text-only footericon. * @internal * @return string HTML */ public function makeFooterIcon( $icon, $withImage = 'withImage' ) { return $this->skin->makeFooterIcon( $icon, $withImage ); } }