Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\ChangeOp\NullChangeOp Class Reference
+ Inheritance diagram for Wikibase\Repo\ChangeOp\NullChangeOp:
+ Collaboration diagram for Wikibase\Repo\ChangeOp\NullChangeOp:

Public Member Functions

 validate (EntityDocument $entity)
 
 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 ChangeOps that will change the entity, ChangeOpResult::validate is recommended for such validations.
Parameters
EntityDocument$entity
Summary | null$summary
Exceptions
InvalidArgumentExceptionwhen called with an unexpected entity type.
ChangeOpExceptionwhen the change can not be applied to the entity, e.g. because the same data was edited in the meantime.
Returns
ChangeOpResult

 
 getActions ()
 

Detailed Description

Member Function Documentation

◆ apply()

Wikibase\Repo\ChangeOp\NullChangeOp::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 ChangeOps that will change the entity, ChangeOpResult::validate is recommended for such validations.

Parameters
EntityDocument$entity
Summary | null$summary
Exceptions
InvalidArgumentExceptionwhen called with an unexpected entity type.
ChangeOpExceptionwhen the change can not be applied to the entity, e.g. because the same data was edited in the meantime.
Returns
ChangeOpResult

Implements Wikibase\Repo\ChangeOp\ChangeOp.

◆ getActions()

Wikibase\Repo\ChangeOp\NullChangeOp::getActions ( )
See also
ChangeOp::getActions
Returns
string[]

Implements Wikibase\Repo\ChangeOp\ChangeOp.

◆ validate()

Wikibase\Repo\ChangeOp\NullChangeOp::validate ( EntityDocument  $entity)
See also
ChangeOp::validate
Parameters
EntityDocument$entityUnused
Returns
Result Always valid

Implements Wikibase\Repo\ChangeOp\ChangeOp.


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