Wikibase
MediaWiki Wikibase extension
|
A PrefetchingTermLookup for federated properties. More...
Public Member Functions | |
__construct (ApiEntityLookup $apiEntityLookup) | |
prefetchTerms (array $entityIds, array $termTypes, array $languageCodes) | |
Loads a set of terms into the buffer. More... | |
getPrefetchedTerm (EntityId $entityId, $termType, $languageCode) | |
Returns a term that was previously loaded by prefetchTerms. More... | |
getPrefetchedAliases (EntityId $entityId, $languageCode) | |
Not implemented. More... | |
Public Member Functions inherited from Wikibase\Lib\Store\EntityTermLookupBase | |
getLabel (EntityId $entityId, $languageCode) | |
getLabels (EntityId $entityId, array $languageCodes) | |
getDescription (EntityId $entityId, $languageCode) | |
getDescriptions (EntityId $entityId, array $languageCodes) | |
Protected Member Functions | |
getTermsOfType (EntityId $entityId, $termType, array $languageCodes) | |
Protected Member Functions inherited from Wikibase\Lib\Store\EntityTermLookupBase | |
convertTermsToMap (array $wikibaseTerms) | |
Private Member Functions | |
getKey (EntityId $entityId, string $termType, string $languageCode) | |
getKeyString (string $entityId, string $termType, string $languageCode) | |
setKeys (array $entityIds, array $termTypes, array $languageCodes) | |
isPrefetched (EntityId $entityId, array $termTypes, array $languageCodes) | |
translateTermTypesToApiProps (array $termTypes) | |
validateTermTypes (array $termTypes) | |
Private Attributes | |
$terms = [] | |
$termKeys = [] | |
$apiEntityLookup | |
const | SUPPORTED_TERM_TYPES = [ TermTypes::TYPE_LABEL, TermTypes::TYPE_DESCRIPTION ] |
A PrefetchingTermLookup for federated properties.
Prefetches from GenericActionApiClient(API) and stores them in $terms (current process only). Looks up terms from $terms.
Wikibase\Repo\FederatedProperties\ApiPrefetchingTermLookup::__construct | ( | ApiEntityLookup | $apiEntityLookup | ) |
ApiEntityLookup | $apiEntityLookup |
|
private |
|
private |
Wikibase\Repo\FederatedProperties\ApiPrefetchingTermLookup::getPrefetchedAliases | ( | EntityId | $entityId, |
$languageCode | |||
) |
Not implemented.
BadMethodCallException | always |
Implements Wikibase\DataAccess\AliasTermBuffer.
Wikibase\Repo\FederatedProperties\ApiPrefetchingTermLookup::getPrefetchedTerm | ( | EntityId | $entityId, |
$termType, | |||
$languageCode | |||
) |
Returns a term that was previously loaded by prefetchTerms.
EntityId | $entityId | |
string | $termType | |
string | $languageCode |
Implements Wikibase\DataModel\Services\Term\TermBuffer.
|
protected |
EntityId | $entityId | |
string | $termType | |
array | $languageCodes |
Reimplemented from Wikibase\Lib\Store\EntityTermLookupBase.
|
private |
Wikibase\Repo\FederatedProperties\ApiPrefetchingTermLookup::prefetchTerms | ( | array | $entityIds, |
array | $termTypes, | ||
array | $languageCodes | ||
) |
Loads a set of terms into the buffer.
The source from which to fetch would typically be supplied to the buffer's constructor.
EntityId[] | $entityIds | |
string[] | $termTypes | The desired term types. |
string[] | $languageCodes | The desired languages. |
Implements Wikibase\DataModel\Services\Term\TermBuffer.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |