MediaWiki
master
RevisionLookup.php
Go to the documentation of this file.
1
<?php
9
namespace
MediaWiki\Revision
;
10
11
use
MediaWiki\Linker\LinkTarget
;
12
use
MediaWiki\Page\PageIdentity
;
13
use
MediaWiki\Page\PageReference
;
14
use
Wikimedia\Rdbms\IDBAccessObject
;
15
25
interface
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
91
): ?
RevisionRecord
;
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
}
MediaWiki\Revision\RevisionRecord
Page revision base class.
Definition
RevisionRecord.php:35
MediaWiki\Linker\LinkTarget
Represents the target of a wiki link.
Definition
LinkTarget.php:19
MediaWiki\Page\PageIdentity
Interface for objects (potentially) representing an editable wiki page.
Definition
PageIdentity.php:53
MediaWiki\Page\PageReference
Interface for objects (potentially) representing a page that can be viewable and linked to on a wiki.
Definition
PageReference.php:38
MediaWiki\Revision\RevisionLookup
Service for looking up page revisions.
Definition
RevisionLookup.php:25
MediaWiki\Revision\RevisionLookup\getRevisionByPageId
getRevisionByPageId( $pageId, $revId=0, $flags=0)
Load either the current, or a specified, revision that's attached to a given page ID.
MediaWiki\Revision\RevisionLookup\getNextRevision
getNextRevision(RevisionRecord $rev, $flags=0)
Get next revision for this title.
MediaWiki\Revision\RevisionLookup\getRevisionById
getRevisionById( $id, $flags=0, ?PageIdentity $page=null)
Load a page revision from a given revision ID number.
MediaWiki\Revision\RevisionLookup\getPreviousRevision
getPreviousRevision(RevisionRecord $rev, $flags=0)
Get previous revision for this title.
MediaWiki\Revision\RevisionLookup\getFirstRevision
getFirstRevision( $page, int $flags=IDBAccessObject::READ_NORMAL)
Get the first revision of the page.
MediaWiki\Revision\RevisionLookup\getTimestampFromId
getTimestampFromId( $id, $flags=0)
Get rev_timestamp from rev_id, without loading the rest of the row.
MediaWiki\Revision\RevisionLookup\getKnownCurrentRevision
getKnownCurrentRevision(PageIdentity $page, $revId=0)
Load a revision based on a known page ID and current revision ID from the DB.
MediaWiki\Revision\RevisionLookup\getRevisionByTitle
getRevisionByTitle( $page, $revId=0, $flags=0)
Load either the current, or a specified, revision that's attached to a given title.
MediaWiki\Revision\RevisionLookup\getRevisionByTimestamp
getRevisionByTimestamp( $page, string $timestamp, int $flags=IDBAccessObject::READ_NORMAL)
Load the revision for the given title with the given timestamp.
Wikimedia\Rdbms\IDBAccessObject
Interface for database access objects.
Definition
IDBAccessObject.php:45
MediaWiki\Revision
Definition
ArchivedRevisionLookup.php:7
includes
Revision
RevisionLookup.php
Generated on Tue Feb 17 2026 13:26:42 for MediaWiki by
1.10.0