Represents a change for an entity; to be extended by various change subtypes.
More...
|
| addUserMetadata ( $repoUserId, $repoUserText, $centralUserId) |
| Add fields and metadata related to the user.
|
|
Represents a change for an entity; to be extended by various change subtypes.
- Copyright
- GPL-2.0-or-later
- Author
- Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
-
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
-
Daniel Kinzler
-
Matthew Flaschen < mflas.nosp@m.chen.nosp@m.@wiki.nosp@m.medi.nosp@m.a.org >
◆ addUserMetadata()
Wikibase\Lib\Changes\EntityChange::addUserMetadata |
( |
|
$repoUserId, |
|
|
|
$repoUserText, |
|
|
|
$centralUserId |
|
) |
| |
|
private |
Add fields and metadata related to the user.
This does not touch other fields or metadata.
- Parameters
-
int | $repoUserId | User ID on wiki where change was made, or 0 for anon |
string | $repoUserText | User text on wiki where change was made, for either logged in user or anon |
int | $centralUserId | Central user ID, or 0 if unknown or not applicable (see docs/change-propagation.wiki) |
◆ getAction()
Wikibase\Lib\Changes\EntityChange::getAction |
( |
| ) |
|
◆ getComment()
Wikibase\Lib\Changes\EntityChange::getComment |
( |
| ) |
|
◆ getEntityId()
Wikibase\Lib\Changes\EntityChange::getEntityId |
( |
| ) |
|
◆ getMetadata()
Wikibase\Lib\Changes\EntityChange::getMetadata |
( |
|
$cache = 'no' | ) |
|
- Parameters
-
string | $cache | set to 'cache' to cache the unserialized diff. |
- Returns
- array false if no meta data could be found in the info array
◆ getSerializedInfo()
Wikibase\Lib\Changes\EntityChange::getSerializedInfo |
( |
|
$skipKeys = [] | ) |
|
◆ getType()
Wikibase\Lib\Changes\EntityChange::getType |
( |
| ) |
|
◆ setEntityId()
Wikibase\Lib\Changes\EntityChange::setEntityId |
( |
EntityId |
$entityId | ) |
|
Set the Change's entity id (as returned by getEntityId) and the object_id field.
- Parameters
-
◆ setMetadata()
Wikibase\Lib\Changes\EntityChange::setMetadata |
( |
array |
$metadata | ) |
|
Sets metadata fields.
Unknown fields are ignored. New metadata is merged into the current metadata array.
- Parameters
-
◆ setMetadataFromRC()
Wikibase\Lib\Changes\EntityChange::setMetadataFromRC |
( |
RecentChange |
$rc, |
|
|
|
$centralUserId |
|
) |
| |
- Parameters
-
RecentChange | $rc | |
int | $centralUserId | Central user ID, or 0 if unknown or not applicable (see docs/change-propagation.wiki) |
- Todo:
- rename to setRecentChangeInfo
◆ setMetadataFromUser()
Wikibase\Lib\Changes\EntityChange::setMetadataFromUser |
( |
User |
$user, |
|
|
|
$centralUserId |
|
) |
| |
- Todo:
- rename to setUserInfo
- Parameters
-
User | $user | User that made change |
int | $centralUserId | Central user ID, or 0 if unknown or not applicable (see docs/change-propagation.wiki) |
◆ setRevisionInfo()
Wikibase\Lib\Changes\EntityChange::setRevisionInfo |
( |
RevisionRecord |
$revision, |
|
|
|
$centralUserId |
|
) |
| |
- Parameters
-
RevisionRecord | $revision | Revision to populate EntityChange from |
int | $centralUserId | Central user ID, or 0 if unknown or not applicable (see docs/change-propagation.wiki) |
◆ setTimestamp()
Wikibase\Lib\Changes\EntityChange::setTimestamp |
( |
|
$timestamp | ) |
|
- Parameters
-
string | $timestamp | Timestamp in TS_MW format |
◆ unserializeInfo()
Wikibase\Lib\Changes\EntityChange::unserializeInfo |
( |
|
$serialization | ) |
|
|
protected |
- See also
- ChangeRow::unserializeInfo
Overwritten to use the array representation of the diff.
- Parameters
-
- Returns
- array the info array
Reimplemented from Wikibase\Lib\Changes\ChangeRow.
◆ $entityId
Wikibase\Lib\Changes\EntityChange::$entityId = null |
|
private |
◆ ADD
const Wikibase\Lib\Changes\EntityChange::ADD = 'add' |
◆ REMOVE
const Wikibase\Lib\Changes\EntityChange::REMOVE = 'remove' |
◆ RESTORE
const Wikibase\Lib\Changes\EntityChange::RESTORE = 'restore' |
◆ UPDATE
const Wikibase\Lib\Changes\EntityChange::UPDATE = 'update' |
The documentation for this class was generated from the following file: