Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Api\CreateClaim Class Reference

API module for creating claims. More...

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

Public Member Functions

 __construct (ApiMain $mainModule, string $moduleName, StatementChangeOpFactory $statementChangeOpFactory, ApiErrorReporter $errorReporter, StatementModificationHelper $modificationHelper, callable $resultBuilderInstantiator, callable $entitySavingHelperInstantiator, bool $federatedPropertiesEnabled, array $sandboxEntityIds)
 
 isWriteMode ()
 
 needsToken ()
 

Static Public Member Functions

static factory (ApiMain $mainModule, string $moduleName, ApiHelperFactory $apiHelperFactory, ChangeOpFactoryProvider $changeOpFactoryProvider, EntityIdParser $entityIdParser, SettingsArray $settings, SnakFactory $snakFactory, 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. More...
 

Private Attributes

 $statementChangeOpFactory
 
 $modificationHelper
 
 $resultBuilder
 
 $entitySavingHelper
 
 $sandboxEntityIds
 

Detailed Description

API module for creating claims.

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\CreateClaim::__construct ( ApiMain  $mainModule,
string  $moduleName,
StatementChangeOpFactory  $statementChangeOpFactory,
ApiErrorReporter  $errorReporter,
StatementModificationHelper  $modificationHelper,
callable  $resultBuilderInstantiator,
callable  $entitySavingHelperInstantiator,
bool  $federatedPropertiesEnabled,
array  $sandboxEntityIds 
)

Member Function Documentation

◆ factory()

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

◆ getAllowedParams()

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

◆ getExamplesMessages()

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

◆ isWriteMode()

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

◆ needsToken()

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

◆ validateParameters()

Wikibase\Repo\Api\CreateClaim::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

Member Data Documentation

◆ $entitySavingHelper

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

◆ $errorReporter

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

◆ $modificationHelper

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

◆ $resultBuilder

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

◆ $sandboxEntityIds

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

◆ $statementChangeOpFactory

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

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