PrefetchingTermLookup implementation that does nothing.
More...
|
| 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. |
More...
|
|
| 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().
More...
|
|
| 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
More...
|
|
| 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.
More...
|
|
| 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
More...
|
|
| 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.
More...
|
|
| 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().
More...
|
|
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
◆ getDescription()
Wikibase\DataAccess\NullPrefetchingTermLookup::getDescription |
( |
EntityId |
$entityId, |
|
|
|
$languageCode |
|
) |
| |
◆ getDescriptions()
Wikibase\DataAccess\NullPrefetchingTermLookup::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.
Implements Wikibase\DataModel\Services\Lookup\TermLookup.
◆ getLabel()
Wikibase\DataAccess\NullPrefetchingTermLookup::getLabel |
( |
EntityId |
$entityId, |
|
|
|
$languageCode |
|
) |
| |
◆ getLabels()
Wikibase\DataAccess\NullPrefetchingTermLookup::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.
Implements Wikibase\DataModel\Services\Lookup\TermLookup.
◆ getPrefetchedAliases()
Wikibase\DataAccess\NullPrefetchingTermLookup::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\NullPrefetchingTermLookup::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.
◆ prefetchTerms()
Wikibase\DataAccess\NullPrefetchingTermLookup::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. |
Implements Wikibase\DataModel\Services\Term\TermBuffer.
The documentation for this class was generated from the following file: