Merge "Remove deprecated hook OutputPageMakeCategoryLinks"
[mediawiki.git] / includes / libs / rdbms / database / position / DBPrimaryPos.php
blob2959ec9a089955b818dbf6ff338eb021bd7d5307
1 <?php
3 namespace Wikimedia\Rdbms;
5 use Stringable;
7 /**
8 * An object representing a primary or replica DB position in a replicated setup.
10 * The implementation details of this opaque type are up to the database subclass.
12 * @since 1.37
14 interface DBPrimaryPos extends Stringable {
15 /**
16 * @since 1.25
17 * @return float UNIX timestamp
19 public function asOfTime();
21 /**
22 * @since 1.27
23 * @param DBPrimaryPos $pos
24 * @return bool Whether this position is at or higher than $pos
26 public function hasReached( DBPrimaryPos $pos );
28 /**
29 * @since 1.27
30 * @return string
32 public function __toString();
34 /**
35 * Deserialization from storage
37 * @since 1.39
38 * @param array $data Representation as returned from ::toArray()
39 * @return DBPrimaryPos
41 public static function newFromArray( array $data );
43 /**
44 * Serialization for storage
46 * @since 1.39
47 * @return array Representation for use by ::newFromArray()
49 public function toArray(): array;