Functionality needed to expose Entities to Lua.
More...
|
| __construct (EntityIdParser $entityIdParser, EntityLookup $entityLookup, UsageAccumulator $usageAccumulator, Serializer $entitySerializer, Serializer $statementSerializer, PropertyDataTypeLookup $dataTypeLookup, TermLanguageFallbackChain $termFallbackChain, Language $language, ContentLanguages $termsLanguages, $fineGrainedLuaTracking, LoggerInterface $logger=null) |
|
| getEntity ( $prefixedEntityId) |
| Get entity from prefixed ID (e.g. More...
|
|
| entityExists ( $prefixedEntityId) |
| Find out whether an entity exists. More...
|
|
| getEntityStatements ( $prefixedEntityId, $propertyIdSerialization, $rank) |
| Get statement list from prefixed ID (e.g. More...
|
|
Functionality needed to expose Entities to Lua.
- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::__construct |
( |
EntityIdParser |
$entityIdParser, |
|
|
EntityLookup |
$entityLookup, |
|
|
UsageAccumulator |
$usageAccumulator, |
|
|
Serializer |
$entitySerializer, |
|
|
Serializer |
$statementSerializer, |
|
|
PropertyDataTypeLookup |
$dataTypeLookup, |
|
|
TermLanguageFallbackChain |
$termFallbackChain, |
|
|
Language |
$language, |
|
|
ContentLanguages |
$termsLanguages, |
|
|
|
$fineGrainedLuaTracking, |
|
|
LoggerInterface |
$logger = null |
|
) |
| |
- Parameters
-
EntityIdParser | $entityIdParser | |
EntityLookup | $entityLookup | |
UsageAccumulator | $usageAccumulator | |
Serializer | $entitySerializer | |
Serializer | $statementSerializer | |
PropertyDataTypeLookup | $dataTypeLookup | |
TermLanguageFallbackChain | $termFallbackChain | |
Language | $language | |
ContentLanguages | $termsLanguages | |
bool | $fineGrainedLuaTracking | Whether to track each used aspect separately in Lua or just track the All (X) usage. |
◆ entityExists()
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::entityExists |
( |
|
$prefixedEntityId | ) |
|
Find out whether an entity exists.
- Parameters
-
- Returns
- bool
◆ getEntity()
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::getEntity |
( |
|
$prefixedEntityId | ) |
|
Get entity from prefixed ID (e.g.
"Q23") and return it as serialized array.
- Parameters
-
- Returns
- array|null
◆ getEntityStatements()
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::getEntityStatements |
( |
|
$prefixedEntityId, |
|
|
|
$propertyIdSerialization, |
|
|
|
$rank |
|
) |
| |
Get statement list from prefixed ID (e.g.
"Q23") and property (e.g "P123") and return it as serialized array.
- Parameters
-
string | $prefixedEntityId | |
string | $propertyIdSerialization | |
string | $rank | Which statements to include. Either "best" or "all". |
- Returns
- array|null
◆ logPossibleDoubleRedirect()
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::logPossibleDoubleRedirect |
( |
|
$prefixedEntityId | ) |
|
|
private |
- See also
- UnresolvedEntityRedirectException
- Parameters
-
◆ newClientEntitySerializer()
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::newClientEntitySerializer |
( |
| ) |
|
|
private |
◆ newClientStatementListSerializer()
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::newClientStatementListSerializer |
( |
| ) |
|
|
private |
◆ renumber()
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::renumber |
( |
array & |
$entityArr | ) |
|
|
private |
Recursively renumber a serialized array in place, so it is indexed at 1, not 0.
Just like Lua wants it.
- Parameters
-
◆ $dataTypeLookup
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::$dataTypeLookup |
|
private |
◆ $entityIdParser
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::$entityIdParser |
|
private |
◆ $entityLookup
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::$entityLookup |
|
private |
◆ $entitySerializer
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::$entitySerializer |
|
private |
◆ $fineGrainedLuaTracking
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::$fineGrainedLuaTracking |
|
private |
◆ $language
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::$language |
|
private |
◆ $logger
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::$logger |
|
private |
◆ $statementSerializer
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::$statementSerializer |
|
private |
◆ $termFallbackChain
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::$termFallbackChain |
|
private |
◆ $termsLanguages
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::$termsLanguages |
|
private |
◆ $usageAccumulator
Wikibase\Client\DataAccess\Scribunto\EntityAccessor::$usageAccumulator |
|
private |
The documentation for this class was generated from the following file: