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. More... | |
getLabels (EntityId $entityId, array $languageCodes) | |
Gets all labels of an Entity with the specified EntityId. More... | |
getDescription (EntityId $entityId, $languageCode) | |
Gets the description of an Entity with the specified EntityId and language code. More... | |
getDescriptions (EntityId $entityId, array $languageCodes) | |
Gets all descriptions of an Entity with the specified EntityId. More... | |
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\DataModel\Services\Lookup\EntityRetrievingTermLookup, Wikibase\Lib\Store\EntityTermLookupBase, Wikibase\Lib\Store\CachingPrefetchingTermLookup, Wikibase\DataAccess\NullPrefetchingTermLookup, and Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup.
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\DataModel\Services\Lookup\EntityRetrievingTermLookup, Wikibase\Lib\Store\EntityTermLookupBase, Wikibase\Lib\Store\CachingPrefetchingTermLookup, Wikibase\DataAccess\NullPrefetchingTermLookup, and Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup.
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\DataModel\Services\Lookup\EntityRetrievingTermLookup, Wikibase\Lib\Store\EntityTermLookupBase, Wikibase\Lib\Store\CachingPrefetchingTermLookup, Wikibase\DataAccess\NullPrefetchingTermLookup, and Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup.
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\DataModel\Services\Lookup\EntityRetrievingTermLookup, Wikibase\Lib\Store\EntityTermLookupBase, Wikibase\Lib\Store\CachingPrefetchingTermLookup, Wikibase\DataAccess\NullPrefetchingTermLookup, and Wikibase\Client\DataAccess\Scribunto\CachingFallbackBasedTermLookup.