Wikibase
MediaWiki Wikibase extension
Wikibase\Lib\Store\MatchingTermsLookupPropertyLabelResolver Class Reference

Resolves property labels (which are unique per language) into entity IDs using a MatchingTermsLookup. More...

+ Inheritance diagram for Wikibase\Lib\Store\MatchingTermsLookupPropertyLabelResolver:
+ Collaboration diagram for Wikibase\Lib\Store\MatchingTermsLookupPropertyLabelResolver:

Public Member Functions

 __construct ( $languageCode, MatchingTermsLookup $matchingTermsLookup, BagOStuff $cache, $cacheDuration, $cacheKey)
 
- Public Member Functions inherited from Wikibase\Lib\Store\AbstractTermPropertyLabelResolver
 __construct ( $languageCode, BagOStuff $cache, $cacheDuration, $cacheKey)
 
 getPropertyIdsForLabels (array $labels, $recache='')
 

Protected Member Functions

 loadProperties ()
 
- Protected Member Functions inherited from Wikibase\Lib\Store\AbstractTermPropertyLabelResolver
 getLabelMap ( $recache='')
 Returns a map of labels to EntityIds for all Properties currently defined. More...
 
 getCachedLabelMap ( $recache)
 
 needsRecache (array $propertyIds)
 Checks if recache is needed. More...
 

Private Attributes

 $matchingTermsLookup
 

Additional Inherited Members

- Protected Attributes inherited from Wikibase\Lib\Store\AbstractTermPropertyLabelResolver
 $languageCode
 

Detailed Description

Resolves property labels (which are unique per language) into entity IDs using a MatchingTermsLookup.

Author
Daniel Kinzler
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Store\MatchingTermsLookupPropertyLabelResolver::__construct (   $languageCode,
MatchingTermsLookup  $matchingTermsLookup,
BagOStuff  $cache,
  $cacheDuration,
  $cacheKey 
)
Parameters
string$languageCodeThe language of the labels to look up (typically, the wiki's content language)
MatchingTermsLookup$matchingTermsLookupThe MatchingTermsLookup service to look up labels with
BagOStuff$cacheThe cache to use for labels (typically from ObjectCache::getLocalClusterInstance())
int$cacheDurationNumber of seconds to keep the cached version for. Defaults to 3600 seconds = 1 hour.
string$cacheKeyThe cache key to use, auto-generated based on $lang per default. Should be set to something including the wiki name of the wiki that maintains the properties.

Member Function Documentation

◆ loadProperties()

Wikibase\Lib\Store\MatchingTermsLookupPropertyLabelResolver::loadProperties ( )
protected
Returns
EntityId[] Map of labels to EntityIds

Reimplemented from Wikibase\Lib\Store\AbstractTermPropertyLabelResolver.

Member Data Documentation

◆ $matchingTermsLookup

Wikibase\Lib\Store\MatchingTermsLookupPropertyLabelResolver::$matchingTermsLookup
private

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