|
MediaWiki master
|
A RevisionRecord representing an existing revision persisted in the revision table. More...
Inherits MediaWiki\Revision\RevisionRecord.
Inherited by MediaWiki\Revision\RevisionStoreCacheRecord.

Public Member Functions | |||||||
| __construct (PageIdentity $page, UserIdentity $user, CommentStoreComment $comment, \stdClass $row, RevisionSlots $slots, $wikiId=self::LOCAL) | |||||||
| getComment (int $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |||||||
Fetch revision comment, if it's available to the specified audience.If the specified audience does not have access to the comment, this will return null. Depending on the concrete subclass, null may also be returned if the comment is not yet specified.MCR migration note: this replaced Revision::getComment
| |||||||
| getId ( $wikiId=self::LOCAL) | |||||||
| getPage () | |||||||
| Returns the page this revision belongs to. | |||||||
| getSha1 () | |||||||
| getSize () | |||||||
| getTimestamp () | |||||||
| getUser (int $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |||||||
Fetch revision's author's user identity, if it's available to the specified audience.If the specified audience does not have access to it, null will be returned. Depending on the concrete subclass, null may also be returned if the user is not yet specified.MCR migration note: this replaced Revision::getUser
| |||||||
| isCurrent () | |||||||
Checks whether the revision record is a stored latest revision.
| |||||||
| isDeleted (int $field) | |||||||
MCR migration note: this replaced Revision::isDeleted.
| |||||||
| isReadyForInsertion () | |||||||
| userCan (int $field, Authority $performer) | |||||||
Determine if the given authority is allowed to view a particular field of this revision, if it's marked as deleted.MCR migration note: this corresponded to Revision::userCan
| |||||||
Public Member Functions inherited from MediaWiki\Revision\RevisionRecord | |||||||
| __construct (PageIdentity $page, RevisionSlots $slots, $wikiId=self::LOCAL) | |||||||
| audienceCan (int $field, int $audience, ?Authority $performer=null) | |||||||
| Check that the given audience has access to the given field. | |||||||
| getContent ( $role, $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |||||||
| Returns the Content of the given slot of this revision. | |||||||
| getContentOrThrow ( $role, $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |||||||
| Get the Content of the given slot of this revision. | |||||||
| getInheritedSlots () | |||||||
| Returns slots inherited from some previous revision. | |||||||
| getMainContentModel () | |||||||
| Returns the content model of the main slot of this revision. | |||||||
| getMainContentRaw () | |||||||
| Returns the Content of the main slot of this revision. | |||||||
| getOriginalSlots () | |||||||
| Returns the slots that originate in this revision. | |||||||
| getPageAsLinkTarget () | |||||||
| Returns the title of the page this revision is associated with as a LinkTarget object. | |||||||
| getPageId ( $wikiId=self::LOCAL) | |||||||
| Get the page ID. | |||||||
| getParentId ( $wikiId=self::LOCAL) | |||||||
| Get parent revision ID (the original previous page revision). | |||||||
| getPrimarySlots () | |||||||
| Returns primary slots (those that are not derived). | |||||||
| getSlot ( $role, $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |||||||
| Returns meta-data for the given slot. | |||||||
| getSlotRoles () | |||||||
| Returns the slot names (roles) of all slots present in this revision. | |||||||
| getSlots () | |||||||
| Returns the slots defined for this revision. | |||||||
| getVisibility () | |||||||
| Get the deletion bitfield of the revision. | |||||||
| getWikiId () | |||||||
| Get the ID of the wiki this revision belongs to. | |||||||
| hasSameContent (RevisionRecord $rec) | |||||||
| hasSlot ( $role) | |||||||
| Returns whether the given slot is defined in this revision. | |||||||
| isMinor () | |||||||
| MCR migration note: this replaced Revision::isMinor. | |||||||
Public Member Functions inherited from MediaWiki\DAO\WikiAwareEntity | |||||||
| assertWiki ( $wikiId) | |||||||
| Throws if $wikiId is different from the return value of getWikiId(). | |||||||
Protected Attributes | |
| bool | $mCurrent = false |
Protected Attributes inherited from MediaWiki\Revision\RevisionRecord | |
| CommentStoreComment null | $mComment |
| int | $mDeleted = 0 |
| using the DELETED_XXX and SUPPRESSED_XXX flags | |
| int null | $mId |
| bool | $mMinorEdit = false |
| PageIdentity | $mPage |
| int | $mPageId |
| int null | $mParentId |
| int null | $mSize |
| RevisionSlots | $mSlots |
| string null | $mTimestamp |
| UserIdentity null | $mUser |
| string false | $wikiId = false |
| Wiki ID; false means the current wiki. | |
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\Revision\RevisionRecord | |
| static | userCanBitfield ( $bitfield, int $field, Authority $performer, ?PageIdentity $page=null) |
| Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted. | |
Public Attributes inherited from MediaWiki\Revision\RevisionRecord | |
| const | DELETED_COMMENT = 2 |
| const | DELETED_RESTRICTED = 8 |
| const | DELETED_TEXT = 1 |
| const | DELETED_USER = 4 |
| const | FOR_PUBLIC = 1 |
| const | FOR_THIS_USER = 2 |
| const | RAW = 3 |
| const | SUPPRESSED_ALL |
| const | SUPPRESSED_USER = self::DELETED_USER | self::DELETED_RESTRICTED |
Public Attributes inherited from MediaWiki\DAO\WikiAwareEntity | |
| const | LOCAL = false |
| Wiki ID value to use with instances that are defined relative to the local wiki. | |
A RevisionRecord representing an existing revision persisted in the revision table.
RevisionStoreRecord has no optional fields, getters will never return null.
Definition at line 28 of file RevisionStoreRecord.php.
| MediaWiki\Revision\RevisionStoreRecord::__construct | ( | PageIdentity | $page, |
| UserIdentity | $user, | ||
| CommentStoreComment | $comment, | ||
| \stdClass | $row, | ||
| RevisionSlots | $slots, | ||
| $wikiId = self::LOCAL ) |
| PageIdentity | $page | The page this RevisionRecord is associated with. |
| UserIdentity | $user | |
| CommentStoreComment | $comment | |
| \\stdClass | $row | A row from the revision table. Use RevisionStore::getQueryInfo() to build a query that yields the required fields. |
| RevisionSlots | $slots | The slots of this revision. |
| false | string | $wikiId | Relevant wiki id or self::LOCAL for the current one. |
Definition at line 45 of file RevisionStoreRecord.php.
References MediaWiki\Revision\RevisionRecord\$wikiId, MediaWiki\Page\PageIdentity\exists(), MediaWiki\Page\PageIdentity\getId(), and MediaWiki\Revision\RevisionStoreRecord\getTimestamp().
| MediaWiki\Revision\RevisionStoreRecord::getComment | ( | int | $audience = self::FOR_PUBLIC, |
| ?Authority | $performer = null ) |
Fetch revision comment, if it's available to the specified audience.If the specified audience does not have access to the comment, this will return null. Depending on the concrete subclass, null may also be returned if the comment is not yet specified.MCR migration note: this replaced Revision::getComment
| int | $audience | One of:
|
| Authority | null | $performer | user on whose behalf to check |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 185 of file RevisionStoreRecord.php.
| MediaWiki\Revision\RevisionStoreRecord::getId | ( | $wikiId = self::LOCAL | ) |
| string | false | $wikiId | The wiki ID expected by the caller. |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 153 of file RevisionStoreRecord.php.
| MediaWiki\Revision\RevisionStoreRecord::getPage | ( | ) |
Returns the page this revision belongs to.
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 111 of file RevisionStoreRecord.php.
| MediaWiki\Revision\RevisionStoreRecord::getSha1 | ( | ) |
| RevisionAccessException | if the hash was unknown and could not be calculated. |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 174 of file RevisionStoreRecord.php.
| MediaWiki\Revision\RevisionStoreRecord::getSize | ( | ) |
| RevisionAccessException | if the size was unknown and could not be calculated. |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 162 of file RevisionStoreRecord.php.
| MediaWiki\Revision\RevisionStoreRecord::getTimestamp | ( | ) |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 193 of file RevisionStoreRecord.php.
Referenced by MediaWiki\Revision\RevisionStoreRecord\__construct().
| MediaWiki\Revision\RevisionStoreRecord::getUser | ( | int | $audience = self::FOR_PUBLIC, |
| ?Authority | $performer = null ) |
Fetch revision's author's user identity, if it's available to the specified audience.If the specified audience does not have access to it, null will be returned. Depending on the concrete subclass, null may also be returned if the user is not yet specified.MCR migration note: this replaced Revision::getUser
| int | $audience | One of:
|
| Authority | null | $performer | user on whose behalf to check |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Reimplemented in MediaWiki\Revision\RevisionStoreCacheRecord.
Definition at line 179 of file RevisionStoreRecord.php.
| MediaWiki\Revision\RevisionStoreRecord::isCurrent | ( | ) |
Checks whether the revision record is a stored latest revision.
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 121 of file RevisionStoreRecord.php.
| MediaWiki\Revision\RevisionStoreRecord::isDeleted | ( | int | $field | ) |
MCR migration note: this replaced Revision::isDeleted.
| int | $field | One of DELETED_* bitfield constants |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 126 of file RevisionStoreRecord.php.
| MediaWiki\Revision\RevisionStoreRecord::isReadyForInsertion | ( | ) |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 203 of file RevisionStoreRecord.php.
| MediaWiki\Revision\RevisionStoreRecord::userCan | ( | int | $field, |
| Authority | $performer ) |
Determine if the given authority is allowed to view a particular field of this revision, if it's marked as deleted.MCR migration note: this corresponded to Revision::userCan
| int | $field | Exactly one of the DELETED_* constants (single-bit flag):
|
| Authority | $performer | user on whose behalf to check |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 138 of file RevisionStoreRecord.php.
|
protected |
Definition at line 31 of file RevisionStoreRecord.php.