PluginProbe
Gutenberg / 22.5.3
Gutenberg v22.5.3
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
gutenberg / lib / experimental / sync / interface-gutenberg-sync-storage.php

interface-gutenberg-sync-storage.php in Gutenberg 22.5.3, at lib/experimental/sync/interface-gutenberg-sync-storage.php

53 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Gutenberg_Sync_Storage interface
4 *
5 * @package Gutenberg
6 */
7
8 interface Gutenberg_Sync_Storage {
9 /**
10 * Initialize the storage mechanism.
11 */
12 public function init(): void;
13
14 /**
15 * Add a sync update to a given room.
16 *
17 * @param string $room Room identifier.
18 * @param array $update Sync update.
19 */
20 public function add_update( string $room, array $update ): void;
21
22 /**
23 * Retrieve sync updates for a given room.
24 *
25 * @param string $room Room identifier.
26 * @return array Array of sync updates.
27 */
28 public function get_all_updates( string $room ): array;
29
30 /**
31 * Get awareness state for a given room.
32 *
33 * @param string $room Room identifier.
34 * @return array Merged awarenessstate.
35 */
36 public function get_awareness_state( string $room ): array;
37
38 /**
39 * Remove all updates for a given room.
40 *
41 * @param string $room Room identifier.
42 */
43 public function remove_all_updates( string $room ): void;
44
45 /**
46 * Set awareness state for a given room.
47 *
48 * @param string $room Room identifier.
49 * @param array $awareness Merged awareness state.
50 */
51 public function set_awareness_state( string $room, array $awareness ): void;
52 }
53