Wikibase
MediaWiki Wikibase extension
|
A service interface for buffering terms. More...
Public Member Functions | |
prefetchTerms (array $entityIds, array $termTypes, array $languageCodes) | |
Loads a set of terms into the buffer. | |
getPrefetchedTerm (EntityId $entityId, $termType, $languageCode) | |
Returns a term that was previously loaded by prefetchTerms. | |
A service interface for buffering terms.
Typically implemented in conjunction with TermLookup
, and (like that interface) does not apply language fallbacks.
Wikibase\DataModel\Services\Term\TermBuffer::getPrefetchedTerm | ( | EntityId | $entityId, |
$termType, | |||
$languageCode ) |
Returns a term that was previously loaded by prefetchTerms.
EntityId | $entityId | |
string | $termType | One of of TermTypes::TYPE_LABEL, TermTypes::TYPE_DESCRIPTION, TermTypes::TYPE_ALIAS |
string | $languageCode |
Implemented in Wikibase\DataAccess\NullPrefetchingTermLookup, Wikibase\DataAccess\SourceAndTypeDispatchingPrefetchingTermLookup, Wikibase\Lib\Store\CachingPrefetchingTermLookup, Wikibase\Lib\Store\Sql\Terms\PrefetchingEntityTermLookupBase, and Wikibase\Repo\FederatedProperties\ApiPrefetchingTermLookup.
Wikibase\DataModel\Services\Term\TermBuffer::prefetchTerms | ( | array | $entityIds, |
array | $termTypes, | ||
array | $languageCodes ) |
Loads a set of terms into the buffer.
The source from which to fetch would typically be supplied to the buffer's constructor.
EntityId[] | $entityIds | |
string[] | $termTypes | The desired term types, i.e. any of TermTypes::TYPE_LABEL, TermTypes::TYPE_DESCRIPTION, TermTypes::TYPE_ALIAS |
string[] | $languageCodes | The desired languages. |
Implemented in Wikibase\DataAccess\NullPrefetchingTermLookup, Wikibase\DataAccess\SourceAndTypeDispatchingPrefetchingTermLookup, Wikibase\Lib\Store\CachingPrefetchingTermLookup, and Wikibase\Repo\FederatedProperties\ApiPrefetchingTermLookup.