MediaWiki REL1_31
|
Service for looking up page revisions. More...
Public Member Functions | |
getKnownCurrentRevision (Title $title, $revId) | |
Load a revision based on a known page ID and current revision ID from the DB. | |
getNextRevision (RevisionRecord $rev, Title $title=null) | |
Get next revision for this title. | |
getPreviousRevision (RevisionRecord $rev, Title $title=null) | |
Get previous revision for this title. | |
getRevisionById ( $id, $flags=0) | |
Load a page revision from a given revision ID number. | |
getRevisionByPageId ( $pageId, $revId=0, $flags=0) | |
Load either the current, or a specified, revision that's attached to a given page ID. | |
getRevisionByTitle (LinkTarget $linkTarget, $revId=0, $flags=0) | |
Load either the current, or a specified, revision that's attached to a given link target. | |
Additional Inherited Members | |
Public Attributes inherited from IDBAccessObject | |
const | READ_LOCKING = 3 |
Constants for object loading bitfield flags (higher => higher QoS) | |
const | READ_NONE = -1 |
Service for looking up page revisions.
Definition at line 37 of file RevisionLookup.php.
MediaWiki\Storage\RevisionLookup::getKnownCurrentRevision | ( | Title | $title, |
$revId ) |
Load a revision based on a known page ID and current revision ID from the DB.
This method allows for the use of caching, though accessing anything that normally requires permission checks (aside from the text) will trigger a small DB lookup.
MCR migration note: this replaces Revision::newKnownCurrent
Title | $title | the associated page title |
int | $revId | current revision of this page |
Implemented in MediaWiki\Storage\RevisionStore.
MediaWiki\Storage\RevisionLookup::getNextRevision | ( | RevisionRecord | $rev, |
Title | $title = null ) |
Get next revision for this title.
MCR migration note: this replaces Revision::getNext
RevisionRecord | $rev | |
Title | $title | if known (optional) |
Implemented in MediaWiki\Storage\RevisionStore.
MediaWiki\Storage\RevisionLookup::getPreviousRevision | ( | RevisionRecord | $rev, |
Title | $title = null ) |
Get previous revision for this title.
MCR migration note: this replaces Revision::getPrevious
RevisionRecord | $rev | |
Title | $title | if known (optional) |
Implemented in MediaWiki\Storage\RevisionStore.
MediaWiki\Storage\RevisionLookup::getRevisionById | ( | $id, | |
$flags = 0 ) |
Load a page revision from a given revision ID number.
Returns null if no such revision can be found.
MCR migration note: this replaces Revision::newFromId
$flags include:
int | $id | |
int | $flags | bit field, see IDBAccessObject::READ_XXX |
Implemented in MediaWiki\Storage\RevisionStore.
MediaWiki\Storage\RevisionLookup::getRevisionByPageId | ( | $pageId, | |
$revId = 0, | |||
$flags = 0 ) |
Load either the current, or a specified, revision that's attached to a given page ID.
Returns null if no such revision can be found.
MCR migration note: this replaces Revision::newFromPageId
int | $pageId | |
int | $revId | (optional) |
int | $flags | bit field, see IDBAccessObject::READ_XXX |
Implemented in MediaWiki\Storage\RevisionStore.
MediaWiki\Storage\RevisionLookup::getRevisionByTitle | ( | LinkTarget | $linkTarget, |
$revId = 0, | |||
$flags = 0 ) |
Load either the current, or a specified, revision that's attached to a given link target.
If not attached to that link target, will return null.
MCR migration note: this replaces Revision::newFromTitle
LinkTarget | $linkTarget | |
int | $revId | (optional) |
int | $flags | bit field, see IDBAccessObject::READ_XXX |
Implemented in MediaWiki\Storage\RevisionStore.