|
Wikibase
MediaWiki Wikibase extension
|
Class for mainsnak change operation. More...
Public Member Functions | |
| __construct ( $statementGuid, Snak $snak, GuidGenerator $guidGenerator, SnakValidator $snakValidator) | |
| Constructs a new mainsnak change operation. | |
| getStatementGuid () | |
| apply (EntityDocument $entity, ?Summary $summary=null) | |
| validate (EntityDocument $entity) | |
| Public Member Functions inherited from Wikibase\Repo\ChangeOp\ChangeOpBase | |
| getActions () | |
Protected Member Functions | |
| getClaimSummaryArgs (Snak $mainSnak) | |
| Protected Member Functions inherited from Wikibase\Repo\ChangeOp\ChangeOpBase | |
| updateSummary (?Summary $summary, $action, $language='', $args='') | |
Private Member Functions | |
| addStatement (StatementList $statements, EntityId $entityId, ?Summary $summary) | |
| setStatement (StatementList $statements, ?Summary $summary) | |
Private Attributes | |
| $statementGuid | |
| $snak | |
| $guidGenerator | |
| $snakValidator | |
Class for mainsnak change operation.
| Wikibase\Repo\ChangeOp\ChangeOpMainSnak::__construct | ( | $statementGuid, | |
| Snak | $snak, | ||
| GuidGenerator | $guidGenerator, | ||
| SnakValidator | $snakValidator ) |
Constructs a new mainsnak change operation.
| string | $statementGuid | |
| Snak | $snak | |
| GuidGenerator | $guidGenerator | |
| SnakValidator | $snakValidator |
| InvalidArgumentException |
|
private |
| StatementList | $statements | |
| EntityId | $entityId | |
| Summary | null | $summary |
| Wikibase\Repo\ChangeOp\ChangeOpMainSnak::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.
| 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. |
Implements Wikibase\Repo\ChangeOp\ChangeOp.
|
protected |
| Snak | $mainSnak |
| Wikibase\Repo\ChangeOp\ChangeOpMainSnak::getStatementGuid | ( | ) |
|
private |
| StatementList | $statements | |
| Summary | null | $summary |
| ChangeOpException |
| Wikibase\Repo\ChangeOp\ChangeOpMainSnak::validate | ( | EntityDocument | $entity | ) |
| EntityDocument | $entity |
Implements Wikibase\Repo\ChangeOp\ChangeOp.
|
private |
|
private |
|
private |
|
private |