Class for reference change operation.
More...
Class for reference change operation.
- Copyright
- GPL-2.0-or-later
- Author
- Tobias Gritschacher < tobia.nosp@m.s.gr.nosp@m.itsch.nosp@m.ache.nosp@m.r@wik.nosp@m.imed.nosp@m.ia.de >
-
Daniel Kinzler
◆ __construct()
Wikibase\Repo\ChangeOp\ChangeOpReference::__construct |
( |
|
$statementGuid, |
|
|
Reference |
$reference, |
|
|
|
$referenceHash, |
|
|
SnakValidator |
$snakValidator, |
|
|
|
$index = null |
|
) |
| |
Constructs a new reference change operation.
- Parameters
-
string | $statementGuid | |
Reference | $reference | |
string | $referenceHash | (if empty '' a new reference will be created) |
SnakValidator | $snakValidator | |
int | null | $index | |
- Exceptions
-
◆ addReference()
Wikibase\Repo\ChangeOp\ChangeOpReference::addReference |
( |
ReferenceList |
$references, |
|
|
Summary |
$summary = null |
|
) |
| |
|
protected |
- Parameters
-
ReferenceList | $references | |
Summary | null | $summary | |
- Exceptions
-
◆ apply()
Wikibase\Repo\ChangeOp\ChangeOpReference::apply |
( |
EntityDocument |
$entity, |
|
|
Summary |
$summary = null |
|
) |
| |
- See also
- ChangeOp::apply()
- a new reference gets added when $referenceHash is empty and $reference is set
- the reference gets set to $reference when $referenceHash and $reference are set
- Parameters
-
EntityDocument | $entity | |
Summary | null | $summary | |
- Exceptions
-
InvalidArgumentException | |
ChangeOpException | |
Implements Wikibase\Repo\ChangeOp\ChangeOp.
◆ getSnakSummaryArgs()
Wikibase\Repo\ChangeOp\ChangeOpReference::getSnakSummaryArgs |
( |
Snak |
$snak | ) |
|
|
protected |
◆ setReference()
Wikibase\Repo\ChangeOp\ChangeOpReference::setReference |
( |
ReferenceList |
$references, |
|
|
Summary |
$summary = null |
|
) |
| |
|
protected |
- Parameters
-
ReferenceList | $references | |
Summary | null | $summary | |
- Exceptions
-
◆ validate()
Wikibase\Repo\ChangeOp\ChangeOpReference::validate |
( |
EntityDocument |
$entity | ) |
|
◆ $index
Wikibase\Repo\ChangeOp\ChangeOpReference::$index |
|
private |
◆ $reference
Wikibase\Repo\ChangeOp\ChangeOpReference::$reference |
|
private |
◆ $referenceHash
Wikibase\Repo\ChangeOp\ChangeOpReference::$referenceHash |
|
private |
◆ $snakValidator
Wikibase\Repo\ChangeOp\ChangeOpReference::$snakValidator |
|
private |
◆ $statementGuid
Wikibase\Repo\ChangeOp\ChangeOpReference::$statementGuid |
|
private |
The documentation for this class was generated from the following file: