MediaWiki master
RevisionLookup.php
Go to the documentation of this file.
1<?php
23namespace MediaWiki\Revision;
24
28
38interface RevisionLookup {
39
55 public function getRevisionById( $id, $flags = 0, PageIdentity $page = null );
56
69 public function getRevisionByTitle( $page, $revId = 0, $flags = 0 );
70
83 public function getRevisionByPageId( $pageId, $revId = 0, $flags = 0 );
84
100 public function getRevisionByTimestamp(
101 $page,
102 string $timestamp,
103 int $flags = IDBAccessObject::READ_NORMAL
104 ): ?RevisionRecord;
105
117 public function getPreviousRevision( RevisionRecord $rev, $flags = 0 );
118
130 public function getNextRevision( RevisionRecord $rev, $flags = 0 );
131
142 public function getTimestampFromId( $id, $flags = 0 );
143
157 public function getKnownCurrentRevision( PageIdentity $page, $revId = 0 );
158
167 public function getFirstRevision(
168 $page,
169 int $flags = IDBAccessObject::READ_NORMAL
170 ): ?RevisionRecord;
171
172}
Page revision base class.
Interface for database access objects.
Represents the target of a wiki link.
Interface for objects (potentially) representing an editable wiki page.
Service for looking up page revisions.
getRevisionByPageId( $pageId, $revId=0, $flags=0)
Load either the current, or a specified, revision that's attached to a given page ID.
getNextRevision(RevisionRecord $rev, $flags=0)
Get next revision for this title.
getPreviousRevision(RevisionRecord $rev, $flags=0)
Get previous revision for this title.
getFirstRevision( $page, int $flags=IDBAccessObject::READ_NORMAL)
Get the first revision of the page.
getTimestampFromId( $id, $flags=0)
Get rev_timestamp from rev_id, without loading the rest of the row.
getKnownCurrentRevision(PageIdentity $page, $revId=0)
Load a revision based on a known page ID and current revision ID from the DB.
getRevisionById( $id, $flags=0, PageIdentity $page=null)
Load a page revision from a given revision ID number.
getRevisionByTitle( $page, $revId=0, $flags=0)
Load either the current, or a specified, revision that's attached to a given link target.
getRevisionByTimestamp( $page, string $timestamp, int $flags=IDBAccessObject::READ_NORMAL)
Load the revision for the given title with the given timestamp.