Wikibase
MediaWiki Wikibase extension
|
A transformer for lists of EntityChanges that combines runs of changes into a single change. More...
Public Member Functions | |
__construct (EntityRevisionLookup $entityRevisionLookup, EntityChangeFactory $changeFactory, LoggerInterface $logger, $localSiteId) | |
compareChangesByTimestamp (Change $a, Change $b) | |
Compares two changes based on their timestamp. More... | |
Private Member Functions | |
groupChangesByEntity (array $changes) | |
Group changes by the entity they were applied to. More... | |
isBadgesOnlyChange (DiffOp $siteLinkDiffOp) | |
coalesceRuns (EntityId $entityId, array $changes) | |
Coalesce consecutive changes by the same user to the same entity into one. More... | |
Private Attributes | |
$entityRevisionLookup | |
$changeFactory | |
$logger | |
$localSiteId | |
A transformer for lists of EntityChanges that combines runs of changes into a single change.
A "run" of changes is a sequence of consecutive changes performed by the same user, and not interrupted by a "disruptive" change. Changes altering the association between pages on the local wiki and items on the repo are considered disruptive.
Wikibase\Client\Changes\ChangeRunCoalescer::__construct | ( | EntityRevisionLookup | $entityRevisionLookup, |
EntityChangeFactory | $changeFactory, | ||
LoggerInterface | $logger, | ||
$localSiteId | |||
) |
EntityRevisionLookup | $entityRevisionLookup | |
EntityChangeFactory | $changeFactory | |
LoggerInterface | $logger | |
string | $localSiteId |
|
private |
Coalesce consecutive changes by the same user to the same entity into one.
A run of changes may be broken if the action performed changes (e.g. deletion instead of update) or if a sitelink pointing to the local wiki was modified.
Some types of actions, like deletion, will break runs.
EntityId | $entityId | |
EntityChange[] | $changes |
Compares two changes based on their timestamp.
Change | $a | |
Change | $b |
|
private |
Group changes by the entity they were applied to.
EntityChange[] | $changes |
|
private |
DiffOp | $siteLinkDiffOp |
|
private |
|
private |
|
private |
|
private |