|
| __construct (EntityDiffer $entityDiffer, EntityIdParser $idParser, array $changeClasses, string $defaultEntityChange=EntityChange::class, ?LoggerInterface $logger=null) |
|
| 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. More...
|
|
◆ __construct()
Wikibase\Lib\Changes\EntityChangeFactory::__construct |
( |
EntityDiffer |
$entityDiffer, |
|
|
EntityIdParser |
$idParser, |
|
|
array |
$changeClasses, |
|
|
string |
$defaultEntityChange = EntityChange::class , |
|
|
?LoggerInterface |
$logger = null |
|
) |
| |
- 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. |
string | $defaultEntityChange | |
LoggerInterface | null | $logger | |
◆ 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 |
◆ $defaultEntityChange
Wikibase\Lib\Changes\EntityChangeFactory::$defaultEntityChange |
|
private |
◆ $entityDiffer
Wikibase\Lib\Changes\EntityChangeFactory::$entityDiffer |
|
private |
◆ $idParser
Wikibase\Lib\Changes\EntityChangeFactory::$idParser |
|
private |
◆ $logger
Wikibase\Lib\Changes\EntityChangeFactory::$logger |
|
private |
The documentation for this class was generated from the following file: