/** * Set a key, value in the standard session * * @param string $name * @param mixed $value * @throws \Exception * @return boolean result of set */ public function set($name, $value) { $this->instance->unlock(); $result = $this->instance->set($name, $value); $this->instance->lock(); return $result; }
/** * Destroy an authentication session. * * @param array $identity (optional) - the users account details. * @return boolean */ public function login(array $identity = array()) { if ($this->instance instanceof \Phavour\Session\Storage) { if ($this->instance->isLocked()) { $this->instance->unlock(); } $this->instance->set('identity', $identity); $this->instance->set('roles', array()); $this->instance->lock(); return true; } return false; }