/** * Fill a MagicWord object with data from here * * @param MagicWord $mw */ function getMagic($mw) { // Saves a function call if (!$this->mMagicHookDone) { $this->doMagicHook(); } if (isset($this->mMagicExtensions[$mw->mId])) { $rawEntry = $this->mMagicExtensions[$mw->mId]; } else { $rawEntry = self::$dataCache->getSubitem($this->mCode, 'magicWords', $mw->mId); } if (!is_array($rawEntry)) { wfWarn("\"{$rawEntry}\" is not a valid magic word for \"{$mw->mId}\""); } else { $mw->mCaseSensitive = $rawEntry[0]; $mw->mSynonyms = array_slice($rawEntry, 1); } }
/** * @param $code * @param $key * @param $subkey * @return */ public function getSubitem($code, $key, $subkey) { unset($this->mruLangs[$code]); $this->mruLangs[$code] = true; return parent::getSubitem($code, $key, $subkey); }
/** * @param $key string * @return array|null */ function getMessage($key) { return self::$dataCache->getSubitem($this->mCode, 'messages', $key); }