Closes the current session. Usually only makes sense if you need locking,
which is exactly what Cesession aims to prevent :)

@return boolean True (we assume success).
486789
public function close() : bool
    {
        foreach ($this->handlers as $handler) {
            if (method_exists($handler, 'close')) {
                $handler->close();
            }
        }
        return true;
    }
468083
public function destroy()
    {
        $_SESSION = array();

        if (ini_get('session.use_cookies') and ! headers_sent()) {
            $params = session_get_cookie_params();
            setcookie(session_name(),
                      '',
                      time() - 42000,
                      $params['path'],
                      $params['domain'],
                      $params['secure'],
                      $params['httponly']
            );
        }

        if (! session_destroy()) {
            throw new Exception('Failed to destroy session');
        }

        $this->_setCsrfToken();

        return true;
    }
74037
function close()
    {
        $this->flush();
        $this->_opened = false;
        if ($this->_closeResource === true && is_resource($this->_stream)) {
            fclose($this->_stream);
        }
        return true;
    }
867735
public function close()
    {
        if ($this->active)
        {
            if (session_status() === PHP_SESSION_ACTIVE)
            {
                session_commit();
                $this->values = array();
                $this->session_id = null;
            }
            elseif ($this->session_cache !== null)
            {
                $this->session_cache->save();
            }
            $this->active = false;
        }

        return $this;
    }
1322007
private function hasSession() {

        if(DI::getDefault()->has('session') === true) {

            // get instance of session class
            $this->session = DI::getDefault()->getSession();

            if($this->session->getId() === '') {
                $this->session->start();
            }

            return true;
        }

        return false;
    }
717698
public function close() {
		if ($this->isConnected()) {
			$this->_connection->close();
		}

		$this->connected = false;
		$this->_connection = null;

		return true;
	}
277952
public function clear()
    {
        if ( ! $this->isOpened()) {
            $this->start();
        }
        session_destroy();
        $this->is_opened = false;
        return $this;
    }
514341
public function close()
    {
        if ($this->_stmt) {
            $r = $this->_stmt->close();
            $this->_stmt = null;
            return $r;
        }
        return false;
    }
471912
public function close(){
        if($this->status() !== self::ACTIVE){
            throw Exception\SessionException::notStarted();
        }

        session_commit();
        
        $this->finishedData = $_SESSION;
    }
561076
public function close() {

		if(false === $this -> connection instanceof \mysqli) {
			return trigger_error('Connection already closed');
		}

		$this -> connection -> close();

		return $this;
	}
1103091
public CompletableFuture<Void> close() {
    for (OperationAttempt attempt : new ArrayList<>(attempts.values())) {
      attempt.fail(new ClosedSessionException("session closed"));
    }
    attempts.clear();
    return CompletableFuture.completedFuture(null);
  }
792714
public function unlock()
    {
        $this->_validate();
        $_SESSION[$this->secretStorage]['locks'][$this->_namespaceName] = false;
        return true;
    }
951881
public function handler_close() {
        if ($this->recordid) {
            try {
                $this->database->release_session_lock($this->recordid);
            } catch (\Exception $ex) {
                // Ignore any problems.
            }
        }
        $this->recordid = null;
        $this->lasthash = null;
        return true;
    }
1085067
public function destroy()
    {
        if ($this->active)
        {
            $this->clear();
            if (session_status() === PHP_SESSION_ACTIVE)
                session_commit();
            $this->active = false;
        }
        return $this;
    }
387329
public static function clearSession(){
        session_destroy();
        self::$instance->invalidate();
        setcookie(self::$instance->getName(), self::$instance->getId(), time() - 3600 ,'/');
        return true;
    }
949279
public function lock(): bool
    {
        $result = false;

        if ($this->locker->acquireLock($this->timeout)) {
            $result = true;
        }

        return $result;
    }
1111896
public function close()
    {
        if (!$this->connection) {
            return false;
        }
        $this->countConnections--;
        if ($this->countConnections > 0) {
            return false;
        }
        $this->implementation->close($this->connection);
        $this->connection = null;
        return true;
    }