Ejemplo n.º 1
0
 /**
  * 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);
     }
 }
Ejemplo n.º 2
0
 /**
  * @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);
 }
Ejemplo n.º 3
0
 /**
  * @param $key string
  * @return array|null
  */
 function getMessage($key)
 {
     return self::$dataCache->getSubitem($this->mCode, 'messages', $key);
 }