|
Wikibase
MediaWiki Wikibase extension
|
Represents a diff between two entities. More...
Inheritance diagram for Wikibase\DataModel\Services\Diff\EntityDiff:
Collaboration diagram for Wikibase\DataModel\Services\Diff\EntityDiff:Public Member Functions | |
| __construct (array $operations=[]) | |
| getAliasesDiff () | |
| FIXME: Not all entities do have aliases! | |
| getLabelsDiff () | |
| FIXME: Not all entities do have labels! | |
| getDescriptionsDiff () | |
| FIXME: Not all entities do have descriptions! | |
| getClaimsDiff () | |
| FIXME: Not all entities do have claims a.k.a. | |
| isEmpty () | |
| Returns if there are any changes (equivalent to: any differences between the entities). | |
| getType () | |
Static Public Member Functions | |
| static | newForType ( $entityType, array $operations=[]) |
Protected Member Functions | |
| fixSubstructureDiff (array &$operations, $key) | |
| Checks the type of a substructure diff, and replaces it if needed. | |
Represents a diff between two entities.
| Wikibase\DataModel\Services\Diff\EntityDiff::__construct | ( | array | $operations = [] | ) |
| DiffOp[] | $operations |
Reimplemented in Wikibase\DataModel\Services\Diff\ItemDiff.
|
protected |
Checks the type of a substructure diff, and replaces it if needed.
This is needed for backwards compatibility with old versions of MapDiffer: As of commit ff65735a125e, MapDiffer may generate atomic diffs for substructures even in recursive mode (bug 51363).
| array | &$operations | All change ops; This is a reference, so the substructure diff can be replaced if need be. |
| string | $key | The key of the substructure |
| Wikibase\DataModel\Services\Diff\EntityDiff::getAliasesDiff | ( | ) |
FIXME: Not all entities do have aliases!
Returns a Diff object with the aliases differences.
| Wikibase\DataModel\Services\Diff\EntityDiff::getClaimsDiff | ( | ) |
FIXME: Not all entities do have claims a.k.a.
statements!
Returns a Diff object with the claim differences.
| Wikibase\DataModel\Services\Diff\EntityDiff::getDescriptionsDiff | ( | ) |
FIXME: Not all entities do have descriptions!
Returns a Diff object with the descriptions differences.
| Wikibase\DataModel\Services\Diff\EntityDiff::getLabelsDiff | ( | ) |
FIXME: Not all entities do have labels!
Returns a Diff object with the labels differences.
| Wikibase\DataModel\Services\Diff\EntityDiff::getType | ( | ) |
| Wikibase\DataModel\Services\Diff\EntityDiff::isEmpty | ( | ) |
Returns if there are any changes (equivalent to: any differences between the entities).
Reimplemented in Wikibase\DataModel\Services\Diff\ItemDiff.
|
static |
| string | $entityType | |
| DiffOp[] | $operations |