Wikibase
MediaWiki Wikibase extension
|
A FallbackLabelDescriptionLookup
that dispatches between two other lookups, using one for federated property IDs and one for everything else.
More...
Public Member Functions | |
__construct (FallbackLabelDescriptionLookup $standardLookup, FallbackLabelDescriptionLookup $federatedPropertiesLookup) | |
getLabel (EntityId $entityId) | |
getDescription (EntityId $entityId) | |
Private Member Functions | |
getLookup (EntityId $entityId) | |
Private Attributes | |
$standardLookup | |
$federatedPropertiesLookup | |
A FallbackLabelDescriptionLookup
that dispatches between two other lookups, using one for federated property IDs and one for everything else.
This is necessary because the lookup implementation we want to use for most entity IDs, CachingFallbackLabelDescriptionLookup
, does not support federated properties, because it requires an EntityRevisionLookup (to get the latest revision ID for the cache key), which is not available for federated properties as of July 2022.
This class should only be used by FallbackLabelDescriptionLookupFactory
. Do not use it directly. Once the standard lookup supports federated properties, this class can hopefully be removed again.
Wikibase\Lib\Store\DispatchingFallbackLabelDescriptionLookup::__construct | ( | FallbackLabelDescriptionLookup | $standardLookup, |
FallbackLabelDescriptionLookup | $federatedPropertiesLookup ) |
FallbackLabelDescriptionLookup | $standardLookup | The lookup used for most entity IDs. Usually a CachingFallbackLabelDescriptionLookup . |
FallbackLabelDescriptionLookup | $federatedPropertiesLookup | The lookup used for federated property IDs. Usually a LanguageFallbackLabelDescriptionLookup . |
Wikibase\Lib\Store\DispatchingFallbackLabelDescriptionLookup::getDescription | ( | EntityId | $entityId | ) |
EntityId | $entityId |
LabelDescriptionLookupException |
Implements Wikibase\Lib\Store\FallbackLabelDescriptionLookup.
Wikibase\Lib\Store\DispatchingFallbackLabelDescriptionLookup::getLabel | ( | EntityId | $entityId | ) |
EntityId | $entityId |
LabelDescriptionLookupException |
Implements Wikibase\Lib\Store\FallbackLabelDescriptionLookup.
|
private |
|
private |
|
private |