Manual:RevisionLookup.php
Appearance
From mediawiki.org
| MediaWiki file: RevisionLookup.php | |
|---|---|
| Location: | includes/Revision/ |
| Source code: | master • 1.46.0 • 1.45.4 • 1.43.9 |
| Classes: | MediaWiki\Revision\RevisionLookup |
Service class for looking up the RevisionRecord of a page. Extends IDBAccessObject.
Public methods
[edit ]Get the RevisionRecord:
- getRevisionById() - get RevisionRecord by revision ID number.
- getRevisionByTitle() - get RevisionRecord by PageIdentity. Calling with LinkTarget instead is deprecated since MW 1.36.
- getRevisionByPageId - get RevisionRecord by Page ID.
- getRevisionByTimestamp()
History-based methods:
- getPreviousRevision()
- getNextRevision()
- getKnownCurrentRevision() - load a revision based on a known page ID and current revision ID from the DB. Allows for caching
- getFirstRevision() - get the first revision of the page.
Look up associated properties:
- getTimestampFromId()
See also
[edit ]- Manual:Revision
- Classes :
- Manual:RevisionRecord.php
- Manual:Revision.php used to contain methods that are adopted by RevisionLookup.