Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup Class Reference

A PrefetchingTermLookup that only supports properties, using the new, normalized schema (starting at wbt_property_ids). More...

+ Inheritance diagram for Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup:
+ Collaboration diagram for Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup:

Public Member Functions

 __construct (DatabaseTermInLangIdsResolver $termInLangIdsResolver)
 
 getPrefetchedTerm (EntityId $entityId, $termType, $languageCode)
 
 getPrefetchedAliases (EntityId $entityId, $languageCode)
 Returns terms that were previously loaded by prefetchTerms.
 
- Public Member Functions inherited from Wikibase\Lib\Store\EntityTermLookupBase
 getLabel (EntityId $entityId, $languageCode)
 
 getLabels (EntityId $entityId, array $languageCodes)
 
 getDescription (EntityId $entityId, $languageCode)
 
 getDescriptions (EntityId $entityId, array $languageCodes)
 

Protected Member Functions

 getTermsOfType (EntityId $entityId, $termType, array $languageCodes)
 Gets the text string terms for a given type.
 
- Protected Member Functions inherited from Wikibase\Lib\Store\EntityTermLookupBase
 convertTermsToMap (array $wikibaseTerms)
 

Private Member Functions

 getKey (PropertyId $entityId, string $termType, string $languageCode)
 
 getKeyString (string $entityId, string $termType, string $languageCode)
 
 setKeys (array $entityIds, array $termTypes, array $languageCodes)
 
 isPrefetched (PropertyId $entityId, array $termTypes, array $languageCodes)
 

Private Attributes

 $termInLangIdsResolver
 
 $terms = []
 
 $termKeys = []
 

Detailed Description

A PrefetchingTermLookup that only supports properties, using the new, normalized schema (starting at wbt_property_ids).

Prefetches from DatabaseTermInLangIdsResolver(DB) and stores them in $terms (current process only). Looks up terms from $terms.

Very similar if not basically the same as PrefetchingItemTermLookup

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup::__construct ( DatabaseTermInLangIdsResolver  $termInLangIdsResolver)
Parameters
DatabaseTermInLangIdsResolver$termInLangIdsResolver

Member Function Documentation

◆ getKey()

Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup::getKey ( PropertyId  $entityId,
string  $termType,
string  $languageCode 
)
private

◆ getKeyString()

Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup::getKeyString ( string  $entityId,
string  $termType,
string  $languageCode 
)
private

◆ getPrefetchedAliases()

Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup::getPrefetchedAliases ( EntityId  $entityId,
  $languageCode 
)

Returns terms that were previously loaded by prefetchTerms.

Parameters
EntityId$entityId
string$languageCode
Returns
string[]|false|null The aliases, or false of that entity has no aliases, or null if the term was not yet requested via prefetchTerms().

Implements Wikibase\DataAccess\AliasTermBuffer.

◆ getPrefetchedTerm()

Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup::getPrefetchedTerm ( EntityId  $entityId,
  $termType,
  $languageCode 
)

◆ getTermsOfType()

Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup::getTermsOfType ( EntityId  $entityId,
  $termType,
array  $languageCodes 
)
protected

Gets the text string terms for a given type.

If aliases are requested here you will only receive a single string.

Parameters
EntityId$entityId
string$termType
string[]$languageCodesThe languages to get terms for
Returns
string[] Normally indexed by language code

Reimplemented from Wikibase\Lib\Store\EntityTermLookupBase.

◆ isPrefetched()

Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup::isPrefetched ( PropertyId  $entityId,
array  $termTypes,
array  $languageCodes 
)
private

◆ setKeys()

Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup::setKeys ( array  $entityIds,
array  $termTypes,
array  $languageCodes 
)
private

Member Data Documentation

◆ $termInLangIdsResolver

Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup::$termInLangIdsResolver
private

◆ $termKeys

Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup::$termKeys = []
private

◆ $terms

Wikibase\Lib\Store\Sql\Terms\PrefetchingPropertyTermLookup::$terms = []
private

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