Wikibase
MediaWiki Wikibase extension
|
Decorator on ChangeOps for collecting and distinguishing a collection of ChangeOp instances on entity fingerprint parts. More...
Public Member Functions | |||||||||||
__construct (ChangeOps $innerChangeOps, TermValidatorFactory $termValidatorFactory) | |||||||||||
add ( $changeOps) | |||||||||||
Adds one change operation or a list of change operations. | |||||||||||
getChangeOps () | |||||||||||
Get the array of change operations. | |||||||||||
validate (EntityDocument $entity) | |||||||||||
getActions () | |||||||||||
apply (EntityDocument $entity, ?Summary $summary=null) | |||||||||||
Applies the change represented by this ChangeOp to the given Entity.As ChangeOp does not yet know whether it is going to change the entity or not, and since expensive validations should be run only on ChangeOp s that will change the entity, ChangeOpResult::validate is recommended for such validations.
| |||||||||||
Public Member Functions inherited from Wikibase\Repo\ChangeOp\ChangeOps | |||||||||||
__construct ( $changeOps=[]) | |||||||||||
Private Attributes | |
$innerChangeOps | |
$termValidatorFactory | |
Decorator on ChangeOps for collecting and distinguishing a collection of ChangeOp instances on entity fingerprint parts.
Wikibase\Repo\ChangeOp\ChangeOpFingerprint::__construct | ( | ChangeOps | $innerChangeOps, |
TermValidatorFactory | $termValidatorFactory ) |
Wikibase\Repo\ChangeOp\ChangeOpFingerprint::add | ( | $changeOps | ) |
Adds one change operation or a list of change operations.
ChangeOp | ChangeOp[] | $changeOps |
InvalidArgumentException |
Reimplemented from Wikibase\Repo\ChangeOp\ChangeOps.
Wikibase\Repo\ChangeOp\ChangeOpFingerprint::apply | ( | EntityDocument | $entity, |
?Summary | $summary = null ) |
Applies the change represented by this ChangeOp to the given Entity.As ChangeOp
does not yet know whether it is going to change the entity or not, and since expensive validations should be run only on ChangeOp
s that will change the entity, ChangeOpResult::validate
is recommended for such validations.
EntityDocument | $entity | |
Summary | null | $summary |
InvalidArgumentException | when called with an unexpected entity type. |
ChangeOpException | when the change can not be applied to the entity, e.g. because the same data was edited in the meantime. |
Reimplemented from Wikibase\Repo\ChangeOp\ChangeOps.
Wikibase\Repo\ChangeOp\ChangeOpFingerprint::getActions | ( | ) |
Wikibase\Repo\ChangeOp\ChangeOpFingerprint::getChangeOps | ( | ) |
Get the array of change operations.
Reimplemented from Wikibase\Repo\ChangeOp\ChangeOps.
Wikibase\Repo\ChangeOp\ChangeOpFingerprint::validate | ( | EntityDocument | $entity | ) |
EntityDocument | $entity |
ChangeOpException |
Reimplemented from Wikibase\Repo\ChangeOp\ChangeOps.
|
private |
|
private |