MediaWiki master
RevisionLookup.php
Go to the documentation of this file.
1<?php
9namespace MediaWiki\Revision;
10
15
25interface RevisionLookup {
26
42 public function getRevisionById( $id, $flags = 0, ?PageIdentity $page = null );
43
56 public function getRevisionByTitle( $page, $revId = 0, $flags = 0 );
57
70 public function getRevisionByPageId( $pageId, $revId = 0, $flags = 0 );
71
87 public function getRevisionByTimestamp(
88 $page,
89 string $timestamp,
90 int $flags = IDBAccessObject::READ_NORMAL
92
104 public function getPreviousRevision( RevisionRecord $rev, $flags = 0 );
105
117 public function getNextRevision( RevisionRecord $rev, $flags = 0 );
118
129 public function getTimestampFromId( $id, $flags = 0 );
130
144 public function getKnownCurrentRevision( PageIdentity $page, $revId = 0 );
145
154 public function getFirstRevision(
155 $page,
156 int $flags = IDBAccessObject::READ_NORMAL
157 ): ?RevisionRecord;
158
159}
Page revision base class.
Represents the target of a wiki link.
Interface for objects (potentially) representing an editable wiki page.
Interface for objects (potentially) representing a page that can be viewable and linked to on a wiki.
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.
getRevisionById( $id, $flags=0, ?PageIdentity $page=null)
Load a page revision from a given revision ID number.
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.
getRevisionByTitle( $page, $revId=0, $flags=0)
Load either the current, or a specified, revision that's attached to a given title.
getRevisionByTimestamp( $page, string $timestamp, int $flags=IDBAccessObject::READ_NORMAL)
Load the revision for the given title with the given timestamp.
Interface for database access objects.