Encrypts the session data and saves to the storage;

@param  string $sessionId   Id of the session
@param  string $sessionData Unencrypted session data
@return boolean
336920
public function write($sessionId, $sessionData): bool
    {
        $identifier = $this->cryptProvider->makeSessionIdentifier($sessionId);

        $content = $this->cryptProvider->encryptSessionData($sessionId, $sessionData);

        try {
            $this->storageDriver->save($identifier, $content);
            return true;
        } catch (Exception $e) {
            return false;
        }
    }
1282045
public function write(string $sessionId, string $sessionData)
    {
        $key = "{$this->sessionName}_{$sessionId}";

        return $this->redis->set($key, $sessionData, $this->getConfig()->get('session.maxLifeTime', 1440));
    }
141695
public function setSessionId($sessionId)
    {
        $this->set(self::MAUTIC_SESSION_ID, $sessionId);
        $this->set(self::MTC_SID, $sessionId);

        return $this;
    }
780233
function get_session_by_id($sessionid) {
        try {
            $param = new \Panopto\SessionManagement\GetSessionsById($this->auth, array($sessionid));
            $sessions = $this->smclient->GetSessionsById($param)->getGetSessionsByIdResult()->getSession();
        } catch (Exception $e) {
            return false;
        }
        if (count($sessions)) {
            return $sessions[0];
        }
        return false;
    }
1230405
public function write($session_id, $session_data)
    {
        $this->pdo->queryWithParam(
            'INSERT INTO session SET session_id = :session_id, session_data = :session_data ON DUPLICATE KEY UPDATE session_data = :session_data',
            [
                [':session_id', $session_id, \PDO::PARAM_STR],
                [':session_data', $session_data, \PDO::PARAM_STR]
            ]
        );

        return $this->pdo->getLastOperationStatus();
    }
366931
public function read($sessionID)
    {
        $fileName = $this->getFileName($sessionID);
        if(is_file($fileName))
        {
            return Coroutine::readFile($fileName);
        }
        else
        {
            return '';
        }
    }
578968
private function _getSession($sessionId)
    {
        if (is_null($this->_session)) {
            $this->_session = $this->_repository->find(array('sessionId' => $sessionId));
        }

        return $this->_session;
    }
530130
public function destroy($sessionId)
    {
        if ($this->_lock) {
            $query = $this->newQuery()
                ->where('id', $sessionId);
            if (!$query->delete()) {
                return $this->_fail();
            }
        }
        if ($this->close() === $this->_success) {
            $this->_cookie_destroy();
            return $this->_success;
        }

        return $this->_fail();
    }
811422
public function destroy($sessionId)
    {
        // delete the record associated with this id
        $sql = "DELETE FROM {$this->options['table']} WHERE {$this->options['id_col']} = :id";

        try {
            $stmt = $this->db->prepare($sql);

            $stmt->bindParam(':id', $sessionId, \PDO::PARAM_STR);

            $stmt->execute();
        } catch (\PDOException $e) {
            throw new \RuntimeException(
                sprintf(
                    'PDOException was thrown when trying to delete a session: %s',
                    $e->getMessage()
                ),
                0,
                $e
            );
        }

        return true;
    }
940911
public function write($sessionID, $sessionData, $maxLifeTime)
    {
        Coroutine::writeFile($this->getFileName($sessionID), $sessionData, LOCK_EX);
    }
989894
private function readFromPHPSession($sessionID = true)
    {
        if ($sessionID) {
            if (isset($_SESSION[$this->_sessionName]) && $_SESSION[$this->_sessionName] != "") {
                $this->_session = $_SESSION[$this->_sessionName]->SessionID;
                return true;
            }
        }
        return false;
    }
1192973
public function createPHPSession($sessionID = true)
    {
        if ($sessionID) {
            $_SESSION[$this->_sessionName] = $this->_session;
        }
        return $this;
    }
860655
public static function getSessionFile($sessionID)
    {
        $fileName = HttpCache::$sessionPath . '/tourze_session_' . $sessionID;
        Base::getLog()->debug(__METHOD__ . ' get session file', [
            'file' => $fileName,
        ]);

        if ( ! FileHelper::exists($fileName))
        {
            Base::getLog()->notice(__METHOD__ . ' session file not found, create it', [
                'file' => $fileName,
            ]);
            FileHelper::touch($fileName);
        }
        return $fileName;
    }
1012869
public function write($sessionId, $data): bool
    {
        $this->redis->set($sessionId, $data);
        $this->redis->expireat($sessionId, \time() + $this->lifetime);

        return true;
    }
709584
public function write($session_id, $session_data)
    {
        $result = false;

        if ($this->getTable()->isConnected())
        {
            $row = $this->_table->select($session_id, KDatabase::FETCH_ROW);

            if ($row->isNew()) {
                $row->id   = $session_id;
            }

            $row->time   = time();
            $row->data   = $session_data;
            $row->domain = ini_get('session.cookie_domain');
            $row->path   = ini_get('session.cookie_path');

            $result = $row->save();
        }

        return $result;
    }
650181
public function write($sessionID, $sessionData): bool
    {
        $dbData = ['session_id' => $sessionID, 'session_access_ts' => time(), 'session_data' => $sessionData];
        $query = $this->dbClass->prepare()->replaceInto($this->dbTable)->set($dbData);
        $result = $this->dbClass->execute($query) == 1 ? true : false;

        return $result;
    }
1360797
@Nonnull
	public String createSessionId( @Nonnull final String sessionId ) {
		return isEncodeNodeIdInSessionId() ? _sessionIdFormat.createSessionId(sessionId,  _nodeIdService.getMemcachedNodeId() ) : sessionId;
	}