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. More... | |
getPrefetchedTerm (EntityId $entityId, $termType, $languageCode) | |
Returns a term that was previously loaded by prefetchTerms. More... | |
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\Repo\FederatedProperties\ApiPrefetchingTermLookup, Wikibase\Lib\Store\Sql\Terms\PrefetchingEntityTermLookupBase, Wikibase\Lib\Store\CachingPrefetchingTermLookup, Wikibase\DataAccess\SourceAndTypeDispatchingPrefetchingTermLookup, and Wikibase\DataAccess\NullPrefetchingTermLookup.
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\SourceAndTypeDispatchingPrefetchingTermLookup, Wikibase\Repo\FederatedProperties\ApiPrefetchingTermLookup, Wikibase\Lib\Store\CachingPrefetchingTermLookup, and Wikibase\DataAccess\NullPrefetchingTermLookup.