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\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: