|
| prefetchTerms (array $entityIds, array $termTypes, array $languageCodes) |
| Loads a set of terms into the buffer.The source from which to fetch would typically be supplied to the buffer's constructor.- Parameters
-
EntityId[] | $entityIds | |
string[] | $termTypes | The desired term types, i.e. any of TermTypes::TYPE_LABEL, TermTypes::TYPE_DESCRIPTION, TermTypes::TYPE_ALIAS |
string[] | $languageCodes | The desired languages. |
|
|
| 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().
|
|
| getLabel (EntityId $entityId, $languageCode) |
| Gets the label of an Entity with the specified EntityId and language code.- Since
- 2.0
- Parameters
-
- Exceptions
-
- Returns
- string|null
|
|
| getLabels (EntityId $entityId, array $languageCodes) |
| Gets all labels of an Entity with the specified EntityId.The result will contain the entries for the requested languages, if they exist.- Since
- 2.0
- Parameters
-
EntityId | $entityId | |
string[] | $languageCodes | The list of languages to fetch |
- Exceptions
-
- Returns
- string[] labels, keyed by language.
|
|
| getDescription (EntityId $entityId, $languageCode) |
| Gets the description of an Entity with the specified EntityId and language code.- Since
- 2.0
- Parameters
-
- Exceptions
-
- Returns
- string|null
|
|
| getDescriptions (EntityId $entityId, array $languageCodes) |
| Gets all descriptions of an Entity with the specified EntityId.If $languages is given, the result will contain the entries for the requested languages, if they exist.- Since
- 2.0
- Parameters
-
EntityId | $entityId | |
string[] | $languageCodes | The list of languages to fetch |
- Exceptions
-
- Returns
- string[] descriptions, keyed by language.
|
|
| 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().
|
|
PrefetchingTermLookup implementation that does nothing.
Intended to be used with some services that require a default PrefetchingTermLookup in situations that a default does not make sense.
- Author
- Addshore
- Copyright
- GPL-2.0-or-later