/** * {@inheritdoc} */ public function shutdown() { if ($this->control->status() === 'active') { $_SESSION = $this->accessor->all(); $this->control->close(); } }
/** * Destroys the session deleting stored contents and * the cookie on the client's machine. * * @return void */ public function destroy() { $this->session->truncate(); $params = session_get_cookie_params(); $expire = new \DateTime('-2 days'); setcookie(session_name(), '', $expire->format(\DateTime::COOKIE), $params["path"], $params["domain"], $params["secure"], $params["httponly"]); session_destroy(); }