Resolves property labels (which are unique per language) into entity IDs, uses in-process caching.
More...
Resolves property labels (which are unique per language) into entity IDs, uses in-process caching.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
-
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
◆ __construct()
Wikibase\Lib\Store\AbstractTermPropertyLabelResolver::__construct |
( |
| $languageCode, |
|
|
BagOStuff | $cache, |
|
|
| $cacheDuration, |
|
|
| $cacheKey ) |
- Parameters
-
string | $languageCode | The language of the labels to look up (typically, the wiki's content language) |
BagOStuff | $cache | The cache to use for labels |
int | $cacheDuration | Number of seconds to keep the cached version for. Defaults to 3600 seconds = 1 hour. |
string | $cacheKey | The 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. |
◆ getCachedLabelMap()
Wikibase\Lib\Store\AbstractTermPropertyLabelResolver::getCachedLabelMap |
( |
| $recache | ) |
|
|
protected |
- Parameters
-
- Returns
- array|false
◆ getLabelMap()
Wikibase\Lib\Store\AbstractTermPropertyLabelResolver::getLabelMap |
( |
| $recache = '' | ) |
|
|
protected |
Returns a map of labels to EntityIds for all Properties currently defined.
The information is taking from the cache if possible, and loaded from a MatchingTermsLookup if not.
- Parameters
-
string | $recache | Flag, set to 'recache' to fetch fresh data from the database. |
- Returns
- EntityId[]
◆ getPropertyIdsForLabels()
Wikibase\Lib\Store\AbstractTermPropertyLabelResolver::getPropertyIdsForLabels |
( |
array | $labels, |
|
|
| $recache = '' ) |
◆ loadProperties()
Wikibase\Lib\Store\AbstractTermPropertyLabelResolver::loadProperties |
( |
| ) |
|
|
abstractprotected |
◆ needsRecache()
Wikibase\Lib\Store\AbstractTermPropertyLabelResolver::needsRecache |
( |
array | $propertyIds | ) |
|
|
protected |
Checks if recache is needed.
- Parameters
-
- Returns
- bool
◆ $cache
Wikibase\Lib\Store\AbstractTermPropertyLabelResolver::$cache |
|
private |
◆ $cacheDuration
Wikibase\Lib\Store\AbstractTermPropertyLabelResolver::$cacheDuration |
|
private |
◆ $cacheKey
Wikibase\Lib\Store\AbstractTermPropertyLabelResolver::$cacheKey |
|
private |
◆ $languageCode
Wikibase\Lib\Store\AbstractTermPropertyLabelResolver::$languageCode |
|
protected |
◆ $propertiesByLabel
Wikibase\Lib\Store\AbstractTermPropertyLabelResolver::$propertiesByLabel = null |
|
private |
The documentation for this class was generated from the following file: