PluginProbe
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel / 1.8.0
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel v1.8.0
1.8.0 1.7.1 1.7.0 1.6.0 1.5.2 trunk 0.1 0.2.0 0.2.1 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.4 0.4.1 0.4.2 0.4.3 1.0 1.1 1.2 1.3.1 1.4.0 1.4.1 1.5.0 All 27 releases
flywp / includes / StaticSite / Engine / Incremental / ChangeStore.php

ChangeStore.php in FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel 1.8.0, at includes/StaticSite/Engine/Incremental/ChangeStore.php

54 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FlyWP\StaticSite\Engine\Incremental;
4
5 /**
6 * Writes, reads and clears change rows.
7 *
8 * @since 1.8.0
9 */
10 interface ChangeStore {
11
12 /**
13 * @param string $kind url, delete, list or global.
14 * @param string|null $object_type post, term, user, blog, archive, date or null.
15 * @param int|null $object_id Object ID.
16 * @param string|null $url Absolute URL.
17 * @param string $reason Short reason.
18 *
19 * @return bool False on a database error.
20 */
21 public function insert( $kind, $object_type, $object_id, $url, $reason );
22
23 /**
24 * Rows with $after_id < id <= $up_to_id, in ID order.
25 *
26 * @param int $after_id Last ID of the previous batch.
27 * @param int $up_to_id Highest ID to read.
28 * @param int $limit Batch size.
29 *
30 * @return array<int, array{id:int, kind:string, object_type:string|null, object_id:int|null, url:string|null, reason:string}>
31 */
32 public function rows( $after_id, $up_to_id, $limit );
33
34 /**
35 * @param int $after_id Lowest ID, not included.
36 * @param int $up_to_id Highest ID, included.
37 *
38 * @return bool True when a global row is in the range.
39 */
40 public function has_global( $after_id, $up_to_id );
41
42 /**
43 * @return int Highest row ID, 0 when there are no rows.
44 */
45 public function max_id();
46
47 /**
48 * @param int $change_id Highest row ID to delete.
49 *
50 * @return bool False on a database error.
51 */
52 public function clear_up_to( $change_id );
53 }
54