Represents a change for an entity; to be extended by various change subtypes.
More...
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 |
( |
int | $repoUserId, |
|
|
string | $repoUserText, |
|
|
int | $centralUserId ) |
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 |
( |
string | $cache = 'no' | ) |
|
- Parameters
-
string | $cache | set to 'cache' to cache the unserialized diff. |
- Returns
- 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.
◆ setMetadata()
Wikibase\Lib\Changes\EntityChange::setMetadata |
( |
array | $metadata | ) |
|
Sets metadata fields.
Unknown fields are ignored. New metadata is merged into the current metadata array.
◆ setTimestamp()
Wikibase\Lib\Changes\EntityChange::setTimestamp |
( |
string | $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
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: