Wikibase
MediaWiki Wikibase extension
Wikibase\Lib\Store\EntityTermLookupBase Class Reference
+ Inheritance diagram for Wikibase\Lib\Store\EntityTermLookupBase:
+ Collaboration diagram for Wikibase\Lib\Store\EntityTermLookupBase:

Public Member Functions

 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)
 Gets the text string terms for a given type. More...
 
 convertTermsToMap (array $wikibaseTerms)
 

Detailed Description

Author
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
Daniel Kinzler

Member Function Documentation

◆ convertTermsToMap()

Wikibase\Lib\Store\EntityTermLookupBase::convertTermsToMap ( array  $wikibaseTerms)
protected
Parameters
TermIndexEntry[]$wikibaseTerms
Returns
string[] strings keyed by language code

◆ getDescription()

Wikibase\Lib\Store\EntityTermLookupBase::getDescription ( EntityId  $entityId,
  $languageCode 
)
See also
TermLookup::getDescription
Parameters
EntityId$entityId
string$languageCode
Exceptions
TermLookupException
Returns
string|null

Implements Wikibase\DataModel\Services\Lookup\TermLookup.

◆ getDescriptions()

Wikibase\Lib\Store\EntityTermLookupBase::getDescriptions ( EntityId  $entityId,
array  $languageCodes 
)
See also
TermLookup::getDescriptions
Parameters
EntityId$entityId
string[]$languageCodesThe languages to get terms for
Exceptions
TermLookupException
Returns
string[]

Implements Wikibase\DataModel\Services\Lookup\TermLookup.

◆ getLabel()

Wikibase\Lib\Store\EntityTermLookupBase::getLabel ( EntityId  $entityId,
  $languageCode 
)
See also
TermLookup::getLabel
Parameters
EntityId$entityId
string$languageCode
Exceptions
TermLookupException
Returns
string|null

Implements Wikibase\DataModel\Services\Lookup\TermLookup.

◆ getLabels()

Wikibase\Lib\Store\EntityTermLookupBase::getLabels ( EntityId  $entityId,
array  $languageCodes 
)
See also
TermLookup::getLabels
Parameters
EntityId$entityId
string[]$languageCodesThe languages to get terms for
Exceptions
TermLookupException
Returns
string[]

Implements Wikibase\DataModel\Services\Lookup\TermLookup.

◆ getTermsOfType()

Wikibase\Lib\Store\EntityTermLookupBase::getTermsOfType ( EntityId  $entityId,
  $termType,
array  $languageCodes 
)
abstractprotected

Gets the text string terms for a given type.

If aliases are requested here you will only receive a single string.

Parameters
EntityId$entityId
string$termType
string[]$languageCodesThe languages to get terms for
Returns
string[] Normally indexed by language code

Reimplemented in Wikibase\Repo\FederatedProperties\ApiPrefetchingTermLookup, Wikibase\Lib\Store\Sql\Terms\PrefetchingEntityTermLookupBase, and Wikibase\DataAccess\SourceAndTypeDispatchingPrefetchingTermLookup.


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