コード例 #1
0
ファイル: WarpManager.php プロジェクト: TBNRFrags2468/Economy
 /**
  * (PHP 5 &gt;= 5.0.0)<br/>
  * Whether a offset exists
  * @link http://php.net/manual/en/arrayaccess.offsetexists.php
  * @param mixed $offset <p>
  * An offset to check for.
  * </p>
  * @return boolean true on success or false on failure.
  * </p>
  * <p>
  * The return value will be casted to boolean if non-boolean was returned.
  */
 public function offsetExists($offset)
 {
     $this->reloadStore();
     if (isset($this->warps[$offset]) || $this->flag >= 2 && $this->store->exists($offset)) {
         return true;
     }
     return false;
 }
コード例 #2
0
 protected function registerDefault($name, $text)
 {
     if (!$this->store->exists($name)) {
         $this->store->add($name, $text);
     }
 }