public function set($key, $value) { parent::set($key, $value); if ($value instanceof Model) { // TODO: throw new AjdeException('It is not allowed to store a Model directly in a cookie, use Ajde_Cookie::setModel() instead.'); } $this->_setcookie($this->writer(), time() + 60 * 60 * 24 * $this->_lifetime); }
public function set($key, $value) { parent::set($key, $value); if ($value instanceof Model) { // TODO: throw new AjdeException('It is not allowed to store a Model directly in the session, use Ajde_Session::setModel() instead.'); } $_SESSION[$this->_namespace][$key] = $value; Cache::getInstance()->updateHash($this->hash()); }