|
| __construct (ServiceBySourceAndTypeDispatcher $dispatcher, EntitySourceLookup $sourceLookup) |
|
| prefetchTerms (array $entityIds, ?array $termTypes=null, ?array $languageCodes=null) |
|
| getPrefetchedTerm (EntityId $entityId, $termType, $languageCode) |
| Returns a term that was previously loaded by prefetchTerms.
|
|
| getPrefetchedAliases (EntityId $entityId, $languageCode) |
| Returns terms that were previously loaded by prefetchTerms.
|
|
| getLabel (EntityId $entityId, $languageCode) |
|
| getLabels (EntityId $entityId, array $languageCodes) |
|
| getDescription (EntityId $entityId, $languageCode) |
|
| getDescriptions (EntityId $entityId, array $languageCodes) |
|
| prefetchTerms (array $entityIds, array $termTypes, array $languageCodes) |
| Loads a set of terms into the buffer.
|
|
- Copyright
- GPL-2.0-or-later
◆ __construct()
◆ getLookupForEntitySourceAndType()
Wikibase\DataAccess\SourceAndTypeDispatchingPrefetchingTermLookup::getLookupForEntitySourceAndType |
( |
EntitySource | $source, |
|
|
string | $type ) |
|
private |
◆ getPrefetchedAliases()
Wikibase\DataAccess\SourceAndTypeDispatchingPrefetchingTermLookup::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\DataAccess\SourceAndTypeDispatchingPrefetchingTermLookup::getPrefetchedTerm |
( |
EntityId | $entityId, |
|
|
| $termType, |
|
|
| $languageCode ) |
Returns a term that was previously loaded by prefetchTerms.
- Parameters
-
EntityId | $entityId | |
string | $termType | One of of TermTypes::TYPE_LABEL, TermTypes::TYPE_DESCRIPTION, TermTypes::TYPE_ALIAS |
string | $languageCode | |
- Returns
- string|false|null The term, or false of that term is known to not exist, or null if the term was not yet requested via prefetchTerms().
Implements Wikibase\DataModel\Services\Term\TermBuffer.
◆ getTermsOfType()
Wikibase\DataAccess\SourceAndTypeDispatchingPrefetchingTermLookup::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[] | $languageCodes | The languages to get terms for |
- Returns
- string[] Normally indexed by language code
Reimplemented from Wikibase\Lib\Store\EntityTermLookupBase.
◆ groupEntityIdsBySourceAndType()
Wikibase\DataAccess\SourceAndTypeDispatchingPrefetchingTermLookup::groupEntityIdsBySourceAndType |
( |
array | $entityIds | ) |
|
|
private |
◆ prefetchTerms()
Wikibase\DataAccess\SourceAndTypeDispatchingPrefetchingTermLookup::prefetchTerms |
( |
array | $entityIds, |
|
|
?array | $termTypes = null, |
|
|
?array | $languageCodes = null ) |
- Parameters
-
EntityId[] | $entityIds | |
string[] | null | $termTypes | |
string[] | null | $languageCodes | |
◆ $dispatcher
◆ $sourceLookup
EntitySourceLookup Wikibase\DataAccess\SourceAndTypeDispatchingPrefetchingTermLookup::$sourceLookup |
|
private |
The documentation for this class was generated from the following file: