MediaWiki
1.42.1
RevisionLookup.php
Go to the documentation of this file.
1
<?php
23
namespace
MediaWiki\Revision
;
24
25
use
IDBAccessObject
;
26
use
MediaWiki\Linker\LinkTarget
;
27
use
MediaWiki\Page\PageIdentity
;
28
38
interface
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
}
MediaWiki\Revision\RevisionRecord
Page revision base class.
Definition
RevisionRecord.php:47
IDBAccessObject
Interface for database access objects.
Definition
IDBAccessObject.php:57
MediaWiki\Linker\LinkTarget
Represents the target of a wiki link.
Definition
LinkTarget.php:32
MediaWiki\Page\PageIdentity
Interface for objects (potentially) representing an editable wiki page.
Definition
PageIdentity.php:67
MediaWiki\Revision\RevisionLookup
Service for looking up page revisions.
Definition
RevisionLookup.php:38
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\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\getRevisionById
getRevisionById( $id, $flags=0, PageIdentity $page=null)
Load a page revision from a given revision ID number.
MediaWiki\Revision\RevisionLookup\getRevisionByTitle
getRevisionByTitle( $page, $revId=0, $flags=0)
Load either the current, or a specified, revision that's attached to a given link target.
MediaWiki\Revision\RevisionLookup\getRevisionByTimestamp
getRevisionByTimestamp( $page, string $timestamp, int $flags=IDBAccessObject::READ_NORMAL)
Load the revision for the given title with the given timestamp.
MediaWiki\Revision
Definition
ArchivedRevisionLookup.php:21
includes
Revision
RevisionLookup.php
Generated on Thu Jun 27 2024 16:00:07 for MediaWiki by
1.10.0