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

API module for getting claims. More...

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

Public Member Functions

 __construct (ApiMain $mainModule, string $moduleName, StatementGuidValidator $guidValidator, StatementGuidParser $guidParser, EntityIdParser $idParser, ApiErrorReporter $errorReporter, callable $resultBuilderInstantiator, callable $entityLoadingHelperInstantiator)
 

Static Public Member Functions

static factory (ApiMain $mainModule, string $moduleName, ApiHelperFactory $apiHelperFactory, EntityIdParser $entityIdParser, StatementGuidParser $statementGuidParser, StatementGuidValidator $statementGuidValidator)
 

Protected Member Functions

 getAllowedParams ()
 
 getExamplesMessages ()
 

Private Member Functions

 validateParameters (array $params)
 
 getStatements (EntityDocument $entity, ?string $guid)
 
 newRequestParamsBasedFilter ()
 
 getIdentifiers (array $params)
 Obtains the id of the entity for which to obtain claims and the claim GUID in case it was also provided.
 
 getEntityIdFromStatementGuid (string $guid)
 

Private Attributes

 $guidValidator
 
 $guidParser
 
 $errorReporter
 
 $idParser
 
 $entityLoadingHelper
 
 $resultBuilder
 

Detailed Description

API module for getting claims.

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Addshore

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Api\GetClaims::__construct ( ApiMain $mainModule,
string $moduleName,
StatementGuidValidator $guidValidator,
StatementGuidParser $guidParser,
EntityIdParser $idParser,
ApiErrorReporter $errorReporter,
callable $resultBuilderInstantiator,
callable $entityLoadingHelperInstantiator )
See also
ApiBase::__construct
Parameters
ApiMain$mainModule
string$moduleName
StatementGuidValidator$guidValidator
StatementGuidParser$guidParser
EntityIdParser$idParser
ApiErrorReporter$errorReporter
callable$resultBuilderInstantiator
callable$entityLoadingHelperInstantiator

Member Function Documentation

◆ factory()

static Wikibase\Repo\Api\GetClaims::factory ( ApiMain $mainModule,
string $moduleName,
ApiHelperFactory $apiHelperFactory,
EntityIdParser $entityIdParser,
StatementGuidParser $statementGuidParser,
StatementGuidValidator $statementGuidValidator )
static

◆ getAllowedParams()

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

◆ getEntityIdFromStatementGuid()

Wikibase\Repo\Api\GetClaims::getEntityIdFromStatementGuid ( string $guid)
private

◆ getExamplesMessages()

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

◆ getIdentifiers()

Wikibase\Repo\Api\GetClaims::getIdentifiers ( array $params)
private

Obtains the id of the entity for which to obtain claims and the claim GUID in case it was also provided.

Parameters
array$params
Returns
array First element is a prefixed entity id string. Second element is either null or a statements GUID.

◆ getStatements()

Wikibase\Repo\Api\GetClaims::getStatements ( EntityDocument $entity,
?string $guid )
private

◆ newRequestParamsBasedFilter()

Wikibase\Repo\Api\GetClaims::newRequestParamsBasedFilter ( )
private

◆ validateParameters()

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

Member Data Documentation

◆ $entityLoadingHelper

Wikibase\Repo\Api\GetClaims::$entityLoadingHelper
private

◆ $errorReporter

Wikibase\Repo\Api\GetClaims::$errorReporter
private

◆ $guidParser

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

◆ $guidValidator

Wikibase\Repo\Api\GetClaims::$guidValidator
private

◆ $idParser

Wikibase\Repo\Api\GetClaims::$idParser
private

◆ $resultBuilder

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

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