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, $moduleName, StatementGuidValidator $guidValidator, StatementGuidParser $guidParser, EntityIdParser $idParser, ApiErrorReporter $errorReporter, callable $resultBuilderInstantiator, callable $entityLoadingHelperInstantiator)
 

Protected Member Functions

 getAllowedParams ()
 
 getExamplesMessages ()
 

Private Member Functions

 validateParameters (array $params)
 
 getStatements (EntityDocument $entity, $guid=null)
 
 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 ( $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,
  $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

◆ getAllowedParams()

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

◆ getEntityIdFromStatementGuid()

Wikibase\Repo\Api\GetClaims::getEntityIdFromStatementGuid (   $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,
  $guid = null 
)
private
Parameters
EntityDocument$entity
string | null$guid
Returns
StatementList

◆ 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: