Factory to create a FallbackLabelDescriptionLookup
that also resolves redirects.
More...
|
| __construct (LanguageFallbackChainFactory $languageFallbackChainFactory, RedirectResolvingLatestRevisionLookup $redirectResolvingLatestRevisionLookup, TermFallbackCacheFacade $termFallbackCache, TermLookup $termLookup, TermBuffer $termBuffer=null) |
| $termBuffer will be used to prefetch terms if it is provided; in that case, $termLookup should be based on it (they may even be the same object, a PrefetchingTermLookup ).
|
|
| newLabelDescriptionLookup (Language $language, array $entityIds=[], array $termTypes=[TermTypes::TYPE_LABEL]) |
| Create a new LabelDescriptionLookup in the given language that applies language fallbacks, resolves redirects, and has the given entity ID term types (if any) prefetched.
|
|
Factory to create a FallbackLabelDescriptionLookup
that also resolves redirects.
- Copyright
- GPL-2.0-or-later
◆ __construct()
$termBuffer will be used to prefetch terms if it is provided; in that case, $termLookup should be based on it (they may even be the same object, a PrefetchingTermLookup
).
◆ newLabelDescriptionLookup()
Wikibase\Lib\Store\FallbackLabelDescriptionLookupFactory::newLabelDescriptionLookup |
( |
Language | $language, |
|
|
array | $entityIds = [], |
|
|
array | $termTypes = [ TermTypes::TYPE_LABEL ] ) |
Create a new LabelDescriptionLookup in the given language that applies language fallbacks, resolves redirects, and has the given entity ID term types (if any) prefetched.
- Parameters
-
Language | $language | |
EntityId[] | $entityIds | Entity IDs to prefetch terms for, if any. Only relevant if the factory was constructed with a TermBuffer. |
string[] | $termTypes | Term types to prefetch (default: only labels). One or more TermTypes constants. |
- Returns
- FallbackLabelDescriptionLookup
◆ $languageFallbackChainFactory
Wikibase\Lib\Store\FallbackLabelDescriptionLookupFactory::$languageFallbackChainFactory |
|
private |
◆ $redirectResolvingRevisionLookup
Wikibase\Lib\Store\FallbackLabelDescriptionLookupFactory::$redirectResolvingRevisionLookup |
|
private |
◆ $termBuffer
Wikibase\Lib\Store\FallbackLabelDescriptionLookupFactory::$termBuffer |
|
private |
◆ $termFallbackCache
Wikibase\Lib\Store\FallbackLabelDescriptionLookupFactory::$termFallbackCache |
|
private |
◆ $termLookup
Wikibase\Lib\Store\FallbackLabelDescriptionLookupFactory::$termLookup |
|
private |
The documentation for this class was generated from the following file: