private function write()
    {
        $sessionData['data'] = $this->data;
        $sessionData['flash'] = $this->newFlashData;

        // Write session data to database
        $stmt = $this->db->prepare("UPDATE {$this->tableName} SET data = ? WHERE session_id = ?");
        $stmt->execute([json_encode($sessionData), $this->sessionId]);
    }
private function write()
    {
        $sessionData['data'] = $this->data;
        $sessionData['flash'] = $this->newFlashData;

        // Write session data to database
        $stmt = $this->db->prepare("UPDATE {$this->tableName} SET data = ? WHERE session_id = ?");
        $stmt->execute([json_encode($sessionData), $this->sessionId]);
    }
private function write ( ) { $ sessionData [ 'data' ] = $ this -> data ; $ sessionData [ 'flash' ] = $ this -> newFlashData ; // Write session data to database $ stmt = $ this -> db -> prepare ( "UPDATE {$this->tableName} SET data = ? WHERE session_id = ?" ) ; $ stmt -> execute ( [ json_encode ( $ sessionData ) , $ this -> sessionId ] ) ; }
Write Session Data

Writes session data to the database.
@return void
Write Session Data