Wikibase
MediaWiki Wikibase extension
|
A service interface for looking up entity terms. More...
Public Member Functions | |
getLabel (EntityId $entityId, $languageCode) | |
Gets the label of an Entity with the specified EntityId and language code. | |
getLabels (EntityId $entityId, array $languageCodes) | |
Gets all labels of an Entity with the specified EntityId. | |
getDescription (EntityId $entityId, $languageCode) | |
Gets the description of an Entity with the specified EntityId and language code. | |
getDescriptions (EntityId $entityId, array $languageCodes) | |
Gets all descriptions of an Entity with the specified EntityId. | |
A service interface for looking up entity terms.
This service only looks up terms in the specified language(s) and does not apply language fallbacks.
Wikibase\DataModel\Services\Lookup\TermLookup::getDescription | ( | EntityId | $entityId, |
$languageCode ) |
Gets the description of an Entity with the specified EntityId and language code.
EntityId | $entityId | |
string | $languageCode |
TermLookupException | for entity not found |
Implemented in Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup, Wikibase\DataAccess\NullPrefetchingTermLookup, Wikibase\Lib\Store\CachingPrefetchingTermLookup, Wikibase\Lib\Store\EntityTermLookupBase, and Wikibase\DataModel\Services\Lookup\EntityRetrievingTermLookup.
Wikibase\DataModel\Services\Lookup\TermLookup::getDescriptions | ( | EntityId | $entityId, |
array | $languageCodes ) |
Gets all descriptions of an Entity with the specified EntityId.
If $languages is given, the result will contain the entries for the requested languages, if they exist.
EntityId | $entityId | |
string[] | $languageCodes | The list of languages to fetch |
TermLookupException | if the entity was not found (not guaranteed). |
Implemented in Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup, Wikibase\DataAccess\NullPrefetchingTermLookup, Wikibase\Lib\Store\CachingPrefetchingTermLookup, Wikibase\Lib\Store\EntityTermLookupBase, and Wikibase\DataModel\Services\Lookup\EntityRetrievingTermLookup.
Wikibase\DataModel\Services\Lookup\TermLookup::getLabel | ( | EntityId | $entityId, |
$languageCode ) |
Gets the label of an Entity with the specified EntityId and language code.
EntityId | $entityId | |
string | $languageCode |
TermLookupException | for entity not found |
Implemented in Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup, Wikibase\DataAccess\NullPrefetchingTermLookup, Wikibase\Lib\Store\CachingPrefetchingTermLookup, Wikibase\Lib\Store\EntityTermLookupBase, and Wikibase\DataModel\Services\Lookup\EntityRetrievingTermLookup.
Wikibase\DataModel\Services\Lookup\TermLookup::getLabels | ( | EntityId | $entityId, |
array | $languageCodes ) |
Gets all labels of an Entity with the specified EntityId.
The result will contain the entries for the requested languages, if they exist.
EntityId | $entityId | |
string[] | $languageCodes | The list of languages to fetch |
TermLookupException | if the entity was not found (not guaranteed). |
Implemented in Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup, Wikibase\DataAccess\NullPrefetchingTermLookup, Wikibase\Lib\Store\CachingPrefetchingTermLookup, Wikibase\Lib\Store\EntityTermLookupBase, and Wikibase\DataModel\Services\Lookup\EntityRetrievingTermLookup.