|
MediaWiki master
|
A cached RevisionStoreRecord. More...
Inherits MediaWiki\Revision\RevisionStoreRecord.

Public Member Functions | |||||||
| __construct (callable $callback, PageIdentity $page, UserIdentity $user, CommentStoreComment $comment, $row, RevisionSlots $slots, $wikiID=self::LOCAL) | |||||||
| getUser ( $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |||||||
| Overridden to ensure that we return a fresh value and not a cached one. | |||||||
| getVisibility () | |||||||
| Overridden to ensure that we return a fresh value and not a cached one. | |||||||
Public Member Functions inherited from MediaWiki\Revision\RevisionStoreRecord | |||||||
| __construct (PageIdentity $page, UserIdentity $user, CommentStoreComment $comment, \stdClass $row, RevisionSlots $slots, $wikiId=self::LOCAL) | |||||||
| getComment ( $audience=self::FOR_PUBLIC, ?Authority $performer=null) | |||||||
| getId ( $wikiId=self::LOCAL) | |||||||
| getPage () | |||||||
| Returns the page this revision belongs to. | |||||||
| getSha1 () | |||||||
| getSize () | |||||||
| getTimestamp () | |||||||
| isCurrent () | |||||||
Checks whether the revision record is a stored current revision.
| |||||||
| isDeleted ( $field) | |||||||
| MCR migration note: this replaced Revision::isDeleted. | |||||||
| isReadyForInsertion () | |||||||
| userCan ( $field, Authority $performer) | |||||||
Determine if the give 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 ( $field, $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. | |||||||
| 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(). | |||||||
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\Revision\RevisionRecord | |
| static | userCanBitfield ( $bitfield, $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. | |
Protected Attributes inherited from MediaWiki\Revision\RevisionStoreRecord | |
| 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. | |
A cached RevisionStoreRecord.
Ensures that changes performed "behind the back" of the cache do not cause the revision record to deliver stale data.
Definition at line 23 of file RevisionStoreCacheRecord.php.
| MediaWiki\Revision\RevisionStoreCacheRecord::__construct | ( | callable | $callback, |
| PageIdentity | $page, | ||
| UserIdentity | $user, | ||
| CommentStoreComment | $comment, | ||
| $row, | |||
| RevisionSlots | $slots, | ||
| $wikiID = self::LOCAL ) |
| callable | $callback | Callback for loading data. Signature: function ( int $revId ): [ int $rev_deleted, UserIdentity $user ] This function will only be called once. |
| 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 RevisionStoreCacheRecord.php.
| MediaWiki\Revision\RevisionStoreCacheRecord::getUser | ( | $audience = self::FOR_PUBLIC, | |
| ?Authority | $performer = null ) |
Overridden to ensure that we return a fresh value and not a cached one.
| int | $audience | |
| Authority | null | $performer |
Reimplemented from MediaWiki\Revision\RevisionStoreRecord.
Definition at line 78 of file RevisionStoreCacheRecord.php.
| MediaWiki\Revision\RevisionStoreCacheRecord::getVisibility | ( | ) |
Overridden to ensure that we return a fresh value and not a cached one.
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 63 of file RevisionStoreCacheRecord.php.