Wikibase
MediaWiki Wikibase extension
|
This TermLookup allows exposes language based lookups for getLabel and getDescription and is backed by the shared TermFallbackCache which stores TermFallback objects. More...
Public Member Functions | |
__construct (TermFallbackCacheFacade $termFallbackCacheFacade, RedirectResolvingLatestRevisionLookup $redirectResolvingLatestRevisionLookup, LanguageFallbackLabelDescriptionLookupFactory $lookupFactory, LanguageFactory $languageFactory, ContentLanguages $contentLanguages) | |
getLabel (EntityId $entityId, $languageCode) | |
getDescription (EntityId $entityId, $languageCode) | |
getLabels (EntityId $entityId, array $languageCodes) | |
getDescriptions (EntityId $entityId, array $languageCodes) | |
Private Member Functions | |
getTerm (EntityId $entityId, string $languageCode, string $termType) | |
getLookup (Language $language) | |
lookupWithoutCache (EntityId $entityId, Language $language, $termType) | |
Private Attributes | |
$termFallbackCache | |
$redirectResolvingLatestRevisionLookup | |
$lookupFactory | |
$languageFactory | |
$contentLanguages | |
$lookups | |
This TermLookup allows exposes language based lookups for getLabel and getDescription and is backed by the shared TermFallbackCache which stores TermFallback objects.
The lookup tries to find the term in the cache and if not present builds a LanguageFallbackLabelDescriptionLookup based on the TermFallbackChain generated by the requested Language.
If the requested language does not match the actual language of the TermFallback this value will still be written to the cache but not returned.
If the TermFallback returns null this value will also be written to the cache as this means no term is available in the requested language.
Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup::__construct | ( | TermFallbackCacheFacade | $termFallbackCacheFacade, |
RedirectResolvingLatestRevisionLookup | $redirectResolvingLatestRevisionLookup, | ||
LanguageFallbackLabelDescriptionLookupFactory | $lookupFactory, | ||
LanguageFactory | $languageFactory, | ||
ContentLanguages | $contentLanguages | ||
) |
Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup::getDescription | ( | EntityId | $entityId, |
$languageCode | |||
) |
Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup::getDescriptions | ( | EntityId | $entityId, |
array | $languageCodes | ||
) |
Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup::getLabel | ( | EntityId | $entityId, |
$languageCode | |||
) |
Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup::getLabels | ( | EntityId | $entityId, |
array | $languageCodes | ||
) |
|
private |
|
private |
|
private |
EntityId | $entityId | |
Language | $language | |
$termType |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |