Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup Class Reference

A lookup for labels and descriptions in a given language. More...

+ Inheritance diagram for Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup:
+ Collaboration diagram for Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup:

Public Member Functions

 __construct (TermLookup $termLookup, TermLanguageFallbackChain $termLanguageFallbackChain)
 
 getLabel (EntityId $entityId)
 
 getDescription (EntityId $entityId)
 

Private Member Functions

 getTermFallback (array $terms, array $fetchLanguages)
 

Private Attributes

 $termLookup
 
 $termLanguageFallbackChain
 

Detailed Description

A lookup for labels and descriptions in a given language.

Applies language fallbacks; does not resolve redirects. Use FallbackLabelDescriptionLookupFactory instead of using this class directly.

Author
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup::__construct ( TermLookup $termLookup,
TermLanguageFallbackChain $termLanguageFallbackChain )
Parameters
TermLookup$termLookup
TermLanguageFallbackChain$termLanguageFallbackChain

Member Function Documentation

◆ getDescription()

Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup::getDescription ( EntityId $entityId)
Parameters
EntityId$entityId
Exceptions
LabelDescriptionLookupException
Returns
TermFallback|null

Implements Wikibase\Lib\Store\FallbackLabelDescriptionLookup.

◆ getLabel()

Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup::getLabel ( EntityId $entityId)
Parameters
EntityId$entityId
Exceptions
LabelDescriptionLookupException
Returns
TermFallback|null

Implements Wikibase\Lib\Store\FallbackLabelDescriptionLookup.

◆ getTermFallback()

Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup::getTermFallback ( array $terms,
array $fetchLanguages )
private
Parameters
string[]$terms
string[]$fetchLanguages
Returns
TermFallback|null

Member Data Documentation

◆ $termLanguageFallbackChain

Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup::$termLanguageFallbackChain
private

◆ $termLookup

Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookup::$termLookup
private

The documentation for this class was generated from the following file: