Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\LegacyEntityTermStoreReader Interface Reference

Methods factored out of TermIndex during the migration away from wb_terms. More...

+ Inheritance diagram for Wikibase\Lib\Store\LegacyEntityTermStoreReader:

Public Member Functions

 getTermsOfEntity (EntityId $entityId, array $termTypes=null, array $languageCodes=null)
 Returns the terms stored for the given entity.
 
 getTermsOfEntities (array $entityIds, array $termTypes=null, array $languageCodes=null)
 Returns the terms stored for the given entities.
 

Detailed Description

Methods factored out of TermIndex during the migration away from wb_terms.

This interface is old and poorly shaped, but not deprecated at this stage.

Deprecated:
As wb_terms is going away, See https://phabricator.wikimedia.org/T208425

Member Function Documentation

◆ getTermsOfEntities()

Wikibase\Lib\Store\LegacyEntityTermStoreReader::getTermsOfEntities ( array  $entityIds,
array  $termTypes = null,
array  $languageCodes = null 
)

Returns the terms stored for the given entities.

Can be filtered by language. Note that all entities queried in one call must be of the same type.

Parameters
EntityId[]$entityIdsEntity ids of one type only.
string[] | null$termTypesThe types of terms to return, e.g. "label", "description", or "alias". Compare the TermIndexEntry::TYPE_XXX constants. If null, all types are returned.
string[] | null$languageCodesThe desired languages, given as language codes. If null, all languages are returned.
Returns
TermIndexEntry[]

Implemented in Wikibase\Lib\Store\NullTermIndex, and Wikibase\Lib\Store\Sql\TermSqlIndex.

◆ getTermsOfEntity()

Wikibase\Lib\Store\LegacyEntityTermStoreReader::getTermsOfEntity ( EntityId  $entityId,
array  $termTypes = null,
array  $languageCodes = null 
)

Returns the terms stored for the given entity.

Parameters
EntityId$entityId
string[] | null$termTypesThe types of terms to return, e.g. "label", "description", or "alias". Compare the TermIndexEntry::TYPE_XXX constants. If null, all types are returned.
string[] | null$languageCodesThe desired languages, given as language codes. If null, all languages are returned.
Returns
TermIndexEntry[]

Implemented in Wikibase\Lib\Store\NullTermIndex, and Wikibase\Lib\Store\Sql\TermSqlIndex.


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