Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Api\SetQualifier Class Reference

API module for creating a qualifier or setting the value of an existing one. More...

+ Inheritance diagram for Wikibase\Repo\Api\SetQualifier:
+ Collaboration diagram for Wikibase\Repo\Api\SetQualifier:

Public Member Functions

 __construct (ApiMain $mainModule, $moduleName, callable $errorReporterInstantiator, StatementChangeOpFactory $statementChangeOpFactory, StatementModificationHelper $modificationHelper, StatementGuidParser $guidParser, callable $resultBuilderInstantiator, callable $entitySavingHelperInstantiator, bool $federatedPropertiesEnabled)
 
 execute ()
 
 isWriteMode ()
 
 needsToken ()
 

Protected Member Functions

 getAllowedParams ()
 
 getExamplesMessages ()
 

Protected Attributes

 $errorReporter
 

Private Member Functions

 validateParameters (array $params)
 Checks if the required parameters are set and the ones that make no sense given the snaktype value are not set.
 
 validateQualifierHash (Statement $statement, $qualifierHash)
 
 getChangeOp ()
 

Private Attributes

 $statementChangeOpFactory
 
 $modificationHelper
 
 $guidParser
 
 $resultBuilder
 
 $entitySavingHelper
 

Detailed Description

API module for creating a qualifier or setting the value of an existing one.

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Daniel Kinzler
Tobias Gritschacher < tobia.nosp@m.s.gr.nosp@m.itsch.nosp@m.ache.nosp@m.r@wik.nosp@m.imed.nosp@m.ia.de >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Api\SetQualifier::__construct ( ApiMain  $mainModule,
  $moduleName,
callable  $errorReporterInstantiator,
StatementChangeOpFactory  $statementChangeOpFactory,
StatementModificationHelper  $modificationHelper,
StatementGuidParser  $guidParser,
callable  $resultBuilderInstantiator,
callable  $entitySavingHelperInstantiator,
bool  $federatedPropertiesEnabled 
)
Parameters
ApiMain$mainModule
string$moduleName
callable$errorReporterInstantiator
StatementChangeOpFactory$statementChangeOpFactory
StatementModificationHelper$modificationHelper
StatementGuidParser$guidParser
callable$resultBuilderInstantiator
callable$entitySavingHelperInstantiator
Note
Using callable for several arguments because of circular dependency and unability to inject object to constructor

Member Function Documentation

◆ execute()

Wikibase\Repo\Api\SetQualifier::execute ( )

◆ getAllowedParams()

Wikibase\Repo\Api\SetQualifier::getAllowedParams ( )
protected

◆ getChangeOp()

Wikibase\Repo\Api\SetQualifier::getChangeOp ( )
private
Returns
ChangeOpQualifier

◆ getExamplesMessages()

Wikibase\Repo\Api\SetQualifier::getExamplesMessages ( )
protected

◆ isWriteMode()

Wikibase\Repo\Api\SetQualifier::isWriteMode ( )

◆ needsToken()

Wikibase\Repo\Api\SetQualifier::needsToken ( )
See also
ApiBase::needsToken
Returns
string

◆ validateParameters()

Wikibase\Repo\Api\SetQualifier::validateParameters ( array  $params)
private

Checks if the required parameters are set and the ones that make no sense given the snaktype value are not set.

Parameters
array$params

◆ validateQualifierHash()

Wikibase\Repo\Api\SetQualifier::validateQualifierHash ( Statement  $statement,
  $qualifierHash 
)
private
Parameters
Statement$statement
string$qualifierHash

Member Data Documentation

◆ $entitySavingHelper

Wikibase\Repo\Api\SetQualifier::$entitySavingHelper
private

◆ $errorReporter

Wikibase\Repo\Api\SetQualifier::$errorReporter
protected

◆ $guidParser

Wikibase\Repo\Api\SetQualifier::$guidParser
private

◆ $modificationHelper

Wikibase\Repo\Api\SetQualifier::$modificationHelper
private

◆ $resultBuilder

Wikibase\Repo\Api\SetQualifier::$resultBuilder
private

◆ $statementChangeOpFactory

Wikibase\Repo\Api\SetQualifier::$statementChangeOpFactory
private

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