Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\ChangeOp\StatementChangeOpFactory Class Reference

Factory for ChangeOps that modify Statements. More...

Public Member Functions

 __construct (GuidGenerator $guidGenerator, StatementGuidValidator $guidValidator, StatementGuidParser $guidParser, SnakValidator $snakValidator, SnakValidator $referenceSnakValidator, SnakNormalizer $snakNormalizer, ReferenceNormalizer $referenceNormalizer, StatementNormalizer $statementNormalizer, bool $normalize)
 
 newSetStatementOp (Statement $statement, $index=null)
 
 newRemoveStatementOp ( $guid)
 
 newSetMainSnakOp ( $statementGuid, Snak $snak)
 
 newSetQualifierOp ( $statementGuid, Snak $snak, $snakHash)
 
 newRemoveQualifierOp ( $statementGuid, $snakHash)
 
 newSetReferenceOp ( $statementGuid, Reference $reference, $referenceHash, $index=null)
 
 newRemoveReferenceOp ( $statementGuid, $referenceHash)
 
 newSetStatementRankOp ( $statementGuid, $rank)
 

Private Attributes

 $guidGenerator
 
 $guidValidator
 
 $guidParser
 
 $snakValidator
 
 $referenceSnakValidator
 
 $snakNormalizer
 
 $referenceNormalizer
 
 $statementNormalizer
 
 $normalize
 

Detailed Description

Factory for ChangeOps that modify Statements.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::__construct ( GuidGenerator  $guidGenerator,
StatementGuidValidator  $guidValidator,
StatementGuidParser  $guidParser,
SnakValidator  $snakValidator,
SnakValidator  $referenceSnakValidator,
SnakNormalizer  $snakNormalizer,
ReferenceNormalizer  $referenceNormalizer,
StatementNormalizer  $statementNormalizer,
bool  $normalize 
)

Member Function Documentation

◆ newRemoveQualifierOp()

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::newRemoveQualifierOp (   $statementGuid,
  $snakHash 
)
Parameters
string$statementGuid
string$snakHash
Exceptions
InvalidArgumentException
Returns
ChangeOp

◆ newRemoveReferenceOp()

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::newRemoveReferenceOp (   $statementGuid,
  $referenceHash 
)
Parameters
string$statementGuid
string$referenceHash
Exceptions
InvalidArgumentException
Returns
ChangeOp

◆ newRemoveStatementOp()

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::newRemoveStatementOp (   $guid)
Parameters
string$guid
Exceptions
InvalidArgumentException
Returns
ChangeOp

◆ newSetMainSnakOp()

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::newSetMainSnakOp (   $statementGuid,
Snak  $snak 
)
Parameters
string$statementGuid
Snak$snak
Exceptions
InvalidArgumentException
Returns
ChangeOp

◆ newSetQualifierOp()

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::newSetQualifierOp (   $statementGuid,
Snak  $snak,
  $snakHash 
)
Parameters
string$statementGuid
Snak$snak
string$snakHash(if not empty '', the old snak is replaced)
Exceptions
InvalidArgumentException
Returns
ChangeOp

◆ newSetReferenceOp()

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::newSetReferenceOp (   $statementGuid,
Reference  $reference,
  $referenceHash,
  $index = null 
)
Parameters
string$statementGuid
Reference$reference
string$referenceHash(if empty '' a new reference will be created)
int | null$indexIndicates the new desired position in the list of references.
Exceptions
InvalidArgumentException
Returns
ChangeOp

◆ newSetStatementOp()

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::newSetStatementOp ( Statement  $statement,
  $index = null 
)
Parameters
Statement$statement
int | null$index
Exceptions
InvalidArgumentException
Returns
ChangeOp

◆ newSetStatementRankOp()

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::newSetStatementRankOp (   $statementGuid,
  $rank 
)
Parameters
string$statementGuid
int$rank
Exceptions
InvalidArgumentException
Returns
ChangeOp

Member Data Documentation

◆ $guidGenerator

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::$guidGenerator
private

◆ $guidParser

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::$guidParser
private

◆ $guidValidator

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::$guidValidator
private

◆ $normalize

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::$normalize
private

◆ $referenceNormalizer

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::$referenceNormalizer
private

◆ $referenceSnakValidator

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::$referenceSnakValidator
private

◆ $snakNormalizer

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::$snakNormalizer
private

◆ $snakValidator

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::$snakValidator
private

◆ $statementNormalizer

Wikibase\Repo\ChangeOp\StatementChangeOpFactory::$statementNormalizer
private

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