MediaWiki REL1_35
|
A RevisionRecord representing an existing revision persisted in the revision table. More...
Public Member Functions | |
__construct (Title $title, UserIdentity $user, CommentStoreComment $comment, $row, RevisionSlots $slots, $dbDomain=false) | |
getComment ( $audience=self::FOR_PUBLIC, User $user=null) | |
getId () | |
getSha1 () | |
getSize () | |
getTimestamp () | |
getUser ( $audience=self::FOR_PUBLIC, User $user=null) | |
isCurrent () | |
Checks whether the revision record is a stored current revision.
| |
isDeleted ( $field) | |
MCR migration note: this replaces Revision::isDeleted. | |
isReadyForInsertion () | |
Public Member Functions inherited from MediaWiki\Revision\RevisionRecord | |
__construct (Title $title, RevisionSlots $slots, $dbDomain=false) | |
__sleep () | |
Implemented to defy serialization. | |
audienceCan ( $field, $audience, User $user=null) | |
Check that the given audience has access to the given field. | |
getContent ( $role, $audience=self::FOR_PUBLIC, User $user=null) | |
Returns the Content of the given slot of this revision. | |
getInheritedSlots () | |
Returns slots inherited from some previous 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 () | |
Get the page ID. | |
getParentId () | |
Get parent revision ID (the original previous page revision). | |
getSlot ( $role, $audience=self::FOR_PUBLIC, User $user=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 replaces Revision::isMinor. | |
Protected Member Functions | |
userCan ( $field, User $user) | |
Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted. | |
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 |
int | $mPageId |
int null | $mParentId |
string null | $mSha1 |
int null | $mSize |
RevisionSlots | $mSlots |
string null | $mTimestamp |
Title | $mTitle |
UserIdentity null | $mUser |
string false | $mWiki = false |
Wiki ID; false means the current wiki. | |
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\Revision\RevisionRecord | |
static | userCanBitfield ( $bitfield, $field, User $user, Title $title=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 |
A RevisionRecord representing an existing revision persisted in the revision table.
RevisionStoreRecord has no optional fields, getters will never return null.
Definition at line 40 of file RevisionStoreRecord.php.
MediaWiki\Revision\RevisionStoreRecord::__construct | ( | Title | $title, |
UserIdentity | $user, | ||
CommentStoreComment | $comment, | ||
$row, | |||
RevisionSlots | $slots, | ||
$dbDomain = false |
|||
) |
Title | $title | The title of the page this Revision 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. |
bool | string | $dbDomain | DB domain of the relevant wiki or false for the current one. |
Definition at line 57 of file RevisionStoreRecord.php.
References $title.
MediaWiki\Revision\RevisionStoreRecord::getComment | ( | $audience = self::FOR_PUBLIC , |
|
User | $user = null |
||
) |
int | $audience | |
User | null | $user |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 201 of file RevisionStoreRecord.php.
MediaWiki\Revision\RevisionStoreRecord::getId | ( | ) |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 151 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.
References MediaWiki\Revision\RevisionRecord\$mSha1.
MediaWiki\Revision\RevisionStoreRecord::getSize | ( | ) |
RevisionAccessException | if the size was unknown and could not be calculated. |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 160 of file RevisionStoreRecord.php.
References MediaWiki\Revision\RevisionRecord\$mSize.
MediaWiki\Revision\RevisionStoreRecord::getTimestamp | ( | ) |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 209 of file RevisionStoreRecord.php.
MediaWiki\Revision\RevisionStoreRecord::getUser | ( | $audience = self::FOR_PUBLIC , |
|
User | $user = null |
||
) |
int | $audience | |
User | null | $user |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Reimplemented in MediaWiki\Revision\RevisionStoreCacheRecord.
Definition at line 190 of file RevisionStoreRecord.php.
MediaWiki\Revision\RevisionStoreRecord::isCurrent | ( | ) |
Checks whether the revision record is a stored current revision.
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 115 of file RevisionStoreRecord.php.
References MediaWiki\Revision\RevisionStoreRecord\$mCurrent.
Referenced by MediaWiki\Revision\RevisionStoreRecord\isDeleted(), and MediaWiki\Revision\RevisionStoreRecord\userCan().
MediaWiki\Revision\RevisionStoreRecord::isDeleted | ( | $field | ) |
MCR migration note: this replaces Revision::isDeleted.
int | $field | One of DELETED_* bitfield constants |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 126 of file RevisionStoreRecord.php.
References MediaWiki\Revision\RevisionStoreRecord\isCurrent().
MediaWiki\Revision\RevisionStoreRecord::isReadyForInsertion | ( | ) |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 219 of file RevisionStoreRecord.php.
|
protected |
Determine if the current user is allowed to view a particular field of this revision, if it's marked as deleted.
MCR migration note: this corresponds to Revision::userCan
int | $field | One of self::DELETED_TEXT, self::DELETED_COMMENT, self::DELETED_USER |
User | $user | User object to check |
Reimplemented from MediaWiki\Revision\RevisionRecord.
Definition at line 137 of file RevisionStoreRecord.php.
References MediaWiki\Revision\RevisionStoreRecord\isCurrent().
|
protected |
Definition at line 43 of file RevisionStoreRecord.php.
Referenced by MediaWiki\Revision\RevisionStoreRecord\isCurrent().