API module to get the data for one or more Wikibase entities.
More...
|
| __construct (ApiMain $mainModule, string $moduleName, StringNormalizer $stringNormalizer, LanguageFallbackChainFactory $languageFallbackChainFactory, SiteLinkGlobalIdentifiersProvider $siteLinkGlobalIdentifiersProvider, EntityPrefetcher $entityPrefetcher, array $siteLinkGroups, ApiErrorReporter $errorReporter, ResultBuilder $resultBuilder, EntityRevisionLookup $entityRevisionLookup, EntityIdParser $idParser, SiteLookup $siteLookup, IBufferingStatsdDataFactory $stats, bool $federatedPropertiesEnabled) |
|
| execute () |
|
|
static | factory (ApiMain $apiMain, string $moduleName, SiteLookup $siteLookup, IBufferingStatsdDataFactory $stats, ApiHelperFactory $apiHelperFactory, EntityIdParser $entityIdParser, EntityRevisionLookup $entityRevisionLookup, LanguageFallbackChainFactory $languageFallbackChainFactory, SettingsArray $repoSettings, SiteLinkGlobalIdentifiersProvider $siteLinkGlobalIdentifiersProvider, Store $store, StringNormalizer $stringNormalizer) |
|
API module to get the data for one or more Wikibase entities.
- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\Repo\Api\GetEntities::__construct |
( |
ApiMain | $mainModule, |
|
|
string | $moduleName, |
|
|
StringNormalizer | $stringNormalizer, |
|
|
LanguageFallbackChainFactory | $languageFallbackChainFactory, |
|
|
SiteLinkGlobalIdentifiersProvider | $siteLinkGlobalIdentifiersProvider, |
|
|
EntityPrefetcher | $entityPrefetcher, |
|
|
array | $siteLinkGroups, |
|
|
ApiErrorReporter | $errorReporter, |
|
|
ResultBuilder | $resultBuilder, |
|
|
EntityRevisionLookup | $entityRevisionLookup, |
|
|
EntityIdParser | $idParser, |
|
|
SiteLookup | $siteLookup, |
|
|
IBufferingStatsdDataFactory | $stats, |
|
|
bool | $federatedPropertiesEnabled ) |
- Parameters
-
ApiMain | $mainModule | |
string | $moduleName | |
StringNormalizer | $stringNormalizer | |
LanguageFallbackChainFactory | $languageFallbackChainFactory | |
SiteLinkGlobalIdentifiersProvider | $siteLinkGlobalIdentifiersProvider | |
EntityPrefetcher | $entityPrefetcher | |
string[] | $siteLinkGroups | |
ApiErrorReporter | $errorReporter | |
ResultBuilder | $resultBuilder | |
EntityRevisionLookup | $entityRevisionLookup | |
EntityIdParser | $idParser | |
SiteLookup | $siteLookup | |
IBufferingStatsdDataFactory | $stats | |
bool | $federatedPropertiesEnabled | |
- See also
- ApiBase::__construct
◆ addMissingItemsToResult()
Wikibase\Repo\Api\GetEntities::addMissingItemsToResult |
( |
array | $missingItems | ) |
|
|
private |
- Parameters
-
array[] | $missingItems | Array of arrays, Each internal array has a key 'site' and 'title' |
◆ execute()
Wikibase\Repo\Api\GetEntities::execute |
( |
| ) |
|
◆ factory()
static Wikibase\Repo\Api\GetEntities::factory |
( |
ApiMain | $apiMain, |
|
|
string | $moduleName, |
|
|
SiteLookup | $siteLookup, |
|
|
IBufferingStatsdDataFactory | $stats, |
|
|
ApiHelperFactory | $apiHelperFactory, |
|
|
EntityIdParser | $entityIdParser, |
|
|
EntityRevisionLookup | $entityRevisionLookup, |
|
|
LanguageFallbackChainFactory | $languageFallbackChainFactory, |
|
|
SettingsArray | $repoSettings, |
|
|
SiteLinkGlobalIdentifiersProvider | $siteLinkGlobalIdentifiersProvider, |
|
|
Store | $store, |
|
|
StringNormalizer | $stringNormalizer ) |
|
static |
◆ getAllowedParams()
Wikibase\Repo\Api\GetEntities::getAllowedParams |
( |
| ) |
|
|
protected |
◆ getEntityIdsFromIdParam()
Wikibase\Repo\Api\GetEntities::getEntityIdsFromIdParam |
( |
array | $params | ) |
|
|
private |
- Parameters
-
- Returns
- EntityId[]
◆ getEntityIdsFromParams()
Wikibase\Repo\Api\GetEntities::getEntityIdsFromParams |
( |
array | $params | ) |
|
|
private |
Get a unique array of EntityIds from api request params.
- Parameters
-
- Returns
- EntityId[]
◆ getEntityIdsFromSiteTitleParams()
Wikibase\Repo\Api\GetEntities::getEntityIdsFromSiteTitleParams |
( |
array | $params | ) |
|
|
private |
- Parameters
-
- Returns
- EntityId[]
◆ getEntityRevision()
Wikibase\Repo\Api\GetEntities::getEntityRevision |
( |
EntityId | $entityId, |
|
|
bool | $resolveRedirects = false ) |
|
private |
◆ getEntityRevisionsFromEntityIds()
Wikibase\Repo\Api\GetEntities::getEntityRevisionsFromEntityIds |
( |
array | $entityIds, |
|
|
bool | $resolveRedirects = false ) |
|
private |
- Parameters
-
EntityId[] | $entityIds | |
bool | $resolveRedirects | |
- Returns
- EntityRevision[]
◆ getExamplesMessages()
Wikibase\Repo\Api\GetEntities::getExamplesMessages |
( |
| ) |
|
|
protected |
◆ getItemByTitleHelper()
Wikibase\Repo\Api\GetEntities::getItemByTitleHelper |
( |
| ) |
|
|
private |
◆ getLanguageCodesAndFallback()
Wikibase\Repo\Api\GetEntities::getLanguageCodesAndFallback |
( |
array | $params | ) |
|
|
private |
- Parameters
-
- Returns
- array 0 => string[] languageCodes that the user wants returned 1 => TermLanguageFallbackChain[] Keys are requested lang codes
◆ getPropsFromParams()
Wikibase\Repo\Api\GetEntities::getPropsFromParams |
( |
array | $params | ) |
|
|
private |
Returns props based on request parameters.
- Parameters
-
- Returns
- array
◆ handleEntity()
Wikibase\Repo\Api\GetEntities::handleEntity |
( |
?string | $sourceEntityId, |
|
|
EntityRevision | $entityRevision = null, |
|
|
array | $params = [] ) |
|
private |
Adds the given EntityRevision to the API result.
- Parameters
-
string | null | $sourceEntityId | |
EntityRevision | null | $entityRevision | |
array | $params | |
◆ $entityPrefetcher
Wikibase\Repo\Api\GetEntities::$entityPrefetcher |
|
private |
◆ $entityRevisionLookup
Wikibase\Repo\Api\GetEntities::$entityRevisionLookup |
|
private |
◆ $errorReporter
Wikibase\Repo\Api\GetEntities::$errorReporter |
|
protected |
◆ $idParser
Wikibase\Repo\Api\GetEntities::$idParser |
|
private |
◆ $languageFallbackChainFactory
Wikibase\Repo\Api\GetEntities::$languageFallbackChainFactory |
|
private |
◆ $resultBuilder
Wikibase\Repo\Api\GetEntities::$resultBuilder |
|
private |
◆ $siteLinkGlobalIdentifiersProvider
Wikibase\Repo\Api\GetEntities::$siteLinkGlobalIdentifiersProvider |
|
private |
◆ $siteLinkGroups
Wikibase\Repo\Api\GetEntities::$siteLinkGroups |
|
private |
◆ $siteLookup
Wikibase\Repo\Api\GetEntities::$siteLookup |
|
private |
◆ $stats
Wikibase\Repo\Api\GetEntities::$stats |
|
private |
◆ $stringNormalizer
Wikibase\Repo\Api\GetEntities::$stringNormalizer |
|
private |
The documentation for this class was generated from the following file: