API module to get the data for one or more Wikibase entities.
More...
|
| __construct (ApiMain $mainModule, $moduleName, StringNormalizer $stringNormalizer, LanguageFallbackChainFactory $languageFallbackChainFactory, SiteLinkTargetProvider $siteLinkTargetProvider, EntityPrefetcher $entityPrefetcher, array $siteLinkGroups, ApiErrorReporter $errorReporter, ResultBuilder $resultBuilder, EntityRevisionLookup $entityRevisionLookup, EntityIdParser $idParser, bool $federatedPropertiesEnabled) |
|
| execute () |
|
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, |
|
|
|
$moduleName, |
|
|
StringNormalizer |
$stringNormalizer, |
|
|
LanguageFallbackChainFactory |
$languageFallbackChainFactory, |
|
|
SiteLinkTargetProvider |
$siteLinkTargetProvider, |
|
|
EntityPrefetcher |
$entityPrefetcher, |
|
|
array |
$siteLinkGroups, |
|
|
ApiErrorReporter |
$errorReporter, |
|
|
ResultBuilder |
$resultBuilder, |
|
|
EntityRevisionLookup |
$entityRevisionLookup, |
|
|
EntityIdParser |
$idParser, |
|
|
bool |
$federatedPropertiesEnabled |
|
) |
| |
- Parameters
-
ApiMain | $mainModule | |
string | $moduleName | |
StringNormalizer | $stringNormalizer | |
LanguageFallbackChainFactory | $languageFallbackChainFactory | |
SiteLinkTargetProvider | $siteLinkTargetProvider | |
EntityPrefetcher | $entityPrefetcher | |
string[] | $siteLinkGroups | |
ApiErrorReporter | $errorReporter | |
ResultBuilder | $resultBuilder | |
EntityRevisionLookup | $entityRevisionLookup | |
EntityIdParser | $idParser | |
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 |
( |
| ) |
|
◆ 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, |
|
|
|
$resolveRedirects = false |
|
) |
| |
|
private |
- Parameters
-
EntityId | $entityId | |
bool | $resolveRedirects | |
- Returns
- null|EntityRevision
◆ getEntityRevisionsFromEntityIds()
Wikibase\Repo\Api\GetEntities::getEntityRevisionsFromEntityIds |
( |
array |
$entityIds, |
|
|
|
$resolveRedirects = false |
|
) |
| |
|
private |
- Parameters
-
EntityId[] | $entityIds | |
bool | $resolveRedirects | |
- Returns
- EntityRevision[]
◆ getExamplesMessages()
Wikibase\Repo\Api\GetEntities::getExamplesMessages |
( |
| ) |
|
|
protected |
◆ getItemByTitleHelper()
Wikibase\Repo\Api\GetEntities::getItemByTitleHelper |
( |
| ) |
|
|
private |
- Returns
- EntityByTitleHelper
◆ getLanguageCodesAndFallback()
Wikibase\Repo\Api\GetEntities::getLanguageCodesAndFallback |
( |
array |
$params | ) |
|
|
private |
- Parameters
-
- Returns
- array 0 => string[] languageCodes that the user wants returned 1 => LanguageFallbackChain[] 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 |
( |
|
$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 |
◆ $siteLinkGroups
Wikibase\Repo\Api\GetEntities::$siteLinkGroups |
|
private |
◆ $siteLinkTargetProvider
Wikibase\Repo\Api\GetEntities::$siteLinkTargetProvider |
|
private |
◆ $stringNormalizer
Wikibase\Repo\Api\GetEntities::$stringNormalizer |
|
private |
The documentation for this class was generated from the following file: