Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\ChangeOp\ChangeOpsResult Class Reference

Class for collection of ChangeOp results. More...

+ Inheritance diagram for Wikibase\Repo\ChangeOp\ChangeOpsResult:
+ Collaboration diagram for Wikibase\Repo\ChangeOp\ChangeOpsResult:

Public Member Functions

 __construct (EntityId $entityId=null, array $changeOpResults=[])
 
 getChangeOpsResults ()
 
 getEntityId ()
 The id of the entity document that the change op was applied to.
 
 isEntityChanged ()
 Whether the entity document was actually changed in any way as a result of applying the change op to it.
 
 validate ()
 Validate a ChangeOpResult.
 

Private Attributes

 $changeOpResults
 
 $entityId
 

Detailed Description

Class for collection of ChangeOp results.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\ChangeOp\ChangeOpsResult::__construct ( EntityId $entityId = null,
array $changeOpResults = [] )
Parameters
EntityId | null$entityId
ChangeOpResult[]$changeOpResults

Member Function Documentation

◆ getChangeOpsResults()

Wikibase\Repo\ChangeOp\ChangeOpsResult::getChangeOpsResults ( )

◆ getEntityId()

Wikibase\Repo\ChangeOp\ChangeOpsResult::getEntityId ( )

The id of the entity document that the change op was applied to.

Returns
EntityId|null

Implements Wikibase\Repo\ChangeOp\ChangeOpResult.

Reimplemented in Wikibase\Repo\ChangeOp\ChangeOpFingerprintResult.

◆ isEntityChanged()

Wikibase\Repo\ChangeOp\ChangeOpsResult::isEntityChanged ( )

Whether the entity document was actually changed in any way as a result of applying the change op to it.

Returns
bool

Implements Wikibase\Repo\ChangeOp\ChangeOpResult.

Reimplemented in Wikibase\Repo\ChangeOp\ChangeOpFingerprintResult.

◆ validate()

Wikibase\Repo\ChangeOp\ChangeOpsResult::validate ( )

Validate a ChangeOpResult.

Mostly suitable for validations that need to run only on the parts that have been actually changed on an entity. Example of those are expensive validations that need to run on db or other external slower types of stores.

For simpler and less-expensive validations, ChangeOp::validate can be used as well.

Concrete example: Checking for uniqueness of terms (fingerprint) across the store is an expensive operation. It better be checked only on terms that are actually going to change on entity, rather than validate uniqueness on all terms including the ones that are not changed.

Returns
Result

Implements Wikibase\Repo\ChangeOp\ChangeOpResult.

Reimplemented in Wikibase\Repo\ChangeOp\ChangeOpFingerprintResult.

Member Data Documentation

◆ $changeOpResults

Wikibase\Repo\ChangeOp\ChangeOpsResult::$changeOpResults
private

◆ $entityId

Wikibase\Repo\ChangeOp\ChangeOpsResult::$entityId
private

The documentation for this class was generated from the following file: