Wikibase
MediaWiki Wikibase extension
|
An EntityRevision contains a specific revision of an EntityDocument. More...
Public Member Functions | |
__construct (EntityDocument $entity, $revisionId=self::UNSAVED_REVISION, $mwTimestamp='') | |
getEntity () | |
getRevisionId () | |
The ID of the revision of the given entity. | |
getTimestamp () | |
The revision's timestamp. | |
Public Attributes | |
const | UNSAVED_REVISION = 0 |
Private Attributes | |
$entity | |
$revisionId | |
$mwTimestamp | |
An EntityRevision contains a specific revision of an EntityDocument.
A revision of an entity is uniquely identified by the tuple ( entity ID, revision ID ).
Note that the revision ID alone cannot be relied upon to identify an entity. Revisions of two different entities may have the same revision ID. For more information on the relationship between entities and wiki pages, see docs/entity-storage.wiki.
Wikibase\Lib\Store\EntityRevision::__construct | ( | EntityDocument | $entity, |
$revisionId = self::UNSAVED_REVISION , |
|||
$mwTimestamp = '' |
|||
) |
EntityDocument | $entity | |
int | $revisionId | Revision ID or 0 for none |
string | $mwTimestamp | in MediaWiki format or an empty string for none |
InvalidArgumentException |
Wikibase\Lib\Store\EntityRevision::getEntity | ( | ) |
Wikibase\Lib\Store\EntityRevision::getRevisionId | ( | ) |
The ID of the revision of the given entity.
Note that this number is not guaranteed to be globally unique, nor to be increasing over time.
Wikibase\Lib\Store\EntityRevision::getTimestamp | ( | ) |
The revision's timestamp.
This is purely informational, it does not identify the revision.
|
private |
|
private |
|
private |
const Wikibase\Lib\Store\EntityRevision::UNSAVED_REVISION = 0 |