Wikibase
MediaWiki Wikibase extension
Wikibase\DataAccess\PrefetchingTermLookup Interface Reference

Interface for implementations of both TermLookup and TermBuffer. More...

+ Inheritance diagram for Wikibase\DataAccess\PrefetchingTermLookup:
+ Collaboration diagram for Wikibase\DataAccess\PrefetchingTermLookup:

Additional Inherited Members

- Public Member Functions inherited from Wikibase\DataModel\Services\Term\TermBuffer
 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...
 
- Public Member Functions inherited from Wikibase\DataModel\Services\Lookup\TermLookup
 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...
 
- Public Member Functions inherited from Wikibase\DataAccess\AliasTermBuffer
 getPrefetchedAliases (EntityId $entityId, $languageCode)
 Returns terms that were previously loaded by prefetchTerms. More...
 

Detailed Description

Interface for implementations of both TermLookup and TermBuffer.

Lookup methods should try to retrieve terms from TermBuffer::getPrefetchedTerm. Implementations may choose to fallback to another lookup if terms have not been prefeteched. Most implementations do not fallback and require terms to be prefetched in order to be returned by the lookups.

Todo:
PrefetchingTermLookup probably wants an implementation that allows composing a service from multiple different parts. This would for example allow MediaInfo to use a default null AliasTermBuffer (as aliases do not exist in that context), while using a LabelLookup etc that looks up from the correct place.

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