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