/** * Destroy the instance of Storage */ public function destroy() { if ($this->instance instanceof \Skinny\Storage) { $this->instance->destroy(); } $this->instance = null; }
/** * Destroy the session and optionally specify $regenerate = true * to regenerate a new session id. * * @param boolean $regenerate * @throws \Exception * @return boolean */ public function destroy($regenerate = false) { $this->instance->unlock(); $result = $this->instance->destroy(); if ($regenerate == true) { session_regenerate_id(true); } return $result; }