public function __construct($name, $options, $lang) { global $wgContLang; if (!self::$parserOptions) { self::$parserOptions = new ParserOptions(); self::$parserOptions->setEditSection(false); self::$parser = new Parser(); } $this->name = $name; $this->options = $options; if ($options['inUserLanguage']) { $this->language = $lang; } else { $this->language = $wgContLang; } }