/** * Get the Language being used for this instance. * getLang was deprecated in 1.19, getLanguage was introduces in the same version. * * @since 0.1 * * @return Language */ public function getLanguage() { return method_exists(get_parent_class(), 'getLanguage') ? parent::getLanguage() : $this->getLang(); }
/** * Get the Language being used for this instance. * SpecialPage extends ContextSource as of 1.18. * * @since 0.1 * * @return Language */ public function getLanguage() { return method_exists('SpecialPage', 'getLanguage') ? parent::getLanguage() : $GLOBALS['wgLang']; }