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, string $moduleName, callable $errorReporterInstantiator, StatementChangeOpFactory $statementChangeOpFactory, StatementModificationHelper $modificationHelper, StatementGuidParser $guidParser, callable $resultBuilderInstantiator, callable $entitySavingHelperInstantiator, bool $federatedPropertiesEnabled, array $sandboxEntityIds)
 
 execute ()
 
 isWriteMode ()
 
 needsToken ()
 

Static Public Member Functions

static factory (ApiMain $mainModule, string $moduleName, ApiHelperFactory $apiHelperFactory, ChangeOpFactoryProvider $changeOpFactoryProvider, EntityIdParser $entityIdParser, SettingsArray $repoSettings, SnakFactory $snakFactory, StatementGuidParser $statementGuidParser, StatementGuidValidator $statementGuidValidator)
 

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, string $qualifierHash)
 
 getChangeOp ()
 

Private Attributes

 $statementChangeOpFactory
 
 $modificationHelper
 
 $guidParser
 
 $resultBuilder
 
 $entitySavingHelper
 
 $sandboxEntityIds
 

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,
string $moduleName,
callable $errorReporterInstantiator,
StatementChangeOpFactory $statementChangeOpFactory,
StatementModificationHelper $modificationHelper,
StatementGuidParser $guidParser,
callable $resultBuilderInstantiator,
callable $entitySavingHelperInstantiator,
bool $federatedPropertiesEnabled,
array $sandboxEntityIds )
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 ( )

◆ factory()

static Wikibase\Repo\Api\SetQualifier::factory ( ApiMain $mainModule,
string $moduleName,
ApiHelperFactory $apiHelperFactory,
ChangeOpFactoryProvider $changeOpFactoryProvider,
EntityIdParser $entityIdParser,
SettingsArray $repoSettings,
SnakFactory $snakFactory,
StatementGuidParser $statementGuidParser,
StatementGuidValidator $statementGuidValidator )
static

◆ getAllowedParams()

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

◆ getChangeOp()

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

◆ 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,
string $qualifierHash )
private

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

◆ $sandboxEntityIds

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

◆ $statementChangeOpFactory

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

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