SimpleSAML_Session::save PHP Method

save() public method

This method saves the session to the session handler in case it has been marked as dirty. WARNING: please do not use this method directly unless you really need to and know what you are doing. Use markDirty() instead.
public save ( )
    public function save()
    {
        if (!$this->dirty) {
            // session hasn't changed, don't bother saving it
            return;
        }
        $this->dirty = false;
        $this->callback_registered = false;
        $sh = SimpleSAML_SessionHandler::getSessionHandler();
        try {
            $sh->saveSession($this);
        } catch (Exception $e) {
            if (!$e instanceof SimpleSAML_Error_Exception) {
                $e = new SimpleSAML_Error_UnserializableException($e);
            }
            SimpleSAML\Logger::error('Unable to save session.');
            $e->logError();
        }
    }