Factory for EntityChange objects.
More...
|
| __construct (EntityDiffer $entityDiffer, EntityIdParser $idParser, array $changeClasses) |
|
| newForChangeType ( $changeType, EntityId $entityId, array $fields) |
|
| newFromFieldData (array $fields) |
|
| newFromUpdate ( $action, EntityDocument $oldEntity=null, EntityDocument $newEntity=null) |
| Constructs an EntityChange from the given old and new Entity.
|
|
Factory for EntityChange objects.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
-
Bene* < benes.nosp@m.tar..nosp@m.wikim.nosp@m.edia.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
◆ __construct()
Wikibase\Lib\Changes\EntityChangeFactory::__construct |
( |
EntityDiffer |
$entityDiffer, |
|
|
EntityIdParser |
$idParser, |
|
|
array |
$changeClasses |
|
) |
| |
- Parameters
-
EntityDiffer | $entityDiffer | |
EntityIdParser | $idParser | |
string[] | $changeClasses | Maps entity type IDs to subclasses of EntityChange. Entity types not mapped explicitly are assumed to use EntityChange itself. |
◆ newForChangeType()
Wikibase\Lib\Changes\EntityChangeFactory::newForChangeType |
( |
|
$changeType, |
|
|
EntityId |
$entityId, |
|
|
array |
$fields |
|
) |
| |
- Parameters
-
string | $changeType | |
EntityId | $entityId | |
array | $fields | additional fields to set |
- Exceptions
-
- Returns
- EntityChange
◆ newFromFieldData()
Wikibase\Lib\Changes\EntityChangeFactory::newFromFieldData |
( |
array |
$fields | ) |
|
- Parameters
-
array | $fields | all data fields, including at least 'type' and 'object_id'. |
- Exceptions
-
- Returns
- EntityChange
◆ newFromUpdate()
Wikibase\Lib\Changes\EntityChangeFactory::newFromUpdate |
( |
|
$action, |
|
|
EntityDocument |
$oldEntity = null , |
|
|
EntityDocument |
$newEntity = null |
|
) |
| |
Constructs an EntityChange from the given old and new Entity.
- Parameters
-
string | $action | The action name |
EntityDocument | null | $oldEntity | |
EntityDocument | null | $newEntity | |
- Returns
- EntityChange
- Exceptions
-
◆ $changeClasses
Wikibase\Lib\Changes\EntityChangeFactory::$changeClasses |
|
private |
◆ $entityDiffer
Wikibase\Lib\Changes\EntityChangeFactory::$entityDiffer |
|
private |
◆ $idParser
Wikibase\Lib\Changes\EntityChangeFactory::$idParser |
|
private |
The documentation for this class was generated from the following file: