/** * (PHP 5 >= 5.0.0)<br/> * Offset to set * @link http://php.net/manual/en/arrayaccess.offsetset.php * @param mixed $offset <p> * The offset to assign the value to. * </p> * @param mixed $value <p> * The value to set. * </p> * @return void */ public function offsetSet($offset, $value) { if ($value instanceof Warp && $value->getName() === $offset) { if ($this->flag < 2) { $this->warps[$offset] = $value; } if ($this->flag >= 1) { $this->store->add($offset, $this->warpToData($value)); $this->saveStore(); } } else { //TODO report failure } }
protected function registerDefault($name, $text) { if (!$this->store->exists($name)) { $this->store->add($name, $text); } }