Example #1
0
 /**
  * {@inheritdoc}
  */
 public function shutdown()
 {
     if ($this->control->status() === 'active') {
         $_SESSION = $this->accessor->all();
         $this->control->close();
     }
 }
Example #2
0
 /**
  * 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();
 }