Actual implementations of various functions to access Wikibase functionality through Scribunto.
More...
|
| __construct (SiteLinkLookup $siteLinkLookup, EntityIdLookup $entityIdLookup, SettingsArray $settings, UsageAccumulator $usageAccumulator, EntityIdParser $entityIdParser, TermLookup $termLookup, ContentLanguages $termsLanguages, ReferencedEntityIdLookup $referencedEntityIdLookup, TitleFormatter $titleFormatter, TitleParser $titleParser, string $siteId, RevisionBasedEntityRedirectTargetLookup $redirectTargetLookup, EntityLookup $entityLookup) |
|
| getEntityId ( $pageTitle, $globalSiteId) |
| Get entity ID from page title and optionally global site ID.
|
|
| isValidEntityId ( $entityIdSerialization) |
| Is this a valid (parseable) entity id.
|
|
| getLabelByLanguage (string $prefixedEntityId, string $languageCode) |
|
| getDescriptionByLanguage (string $prefixedEntityId, string $languageCode) |
|
| getSetting ( $setting) |
|
| getSiteLinkPageName ( $prefixedItemId, $globalSiteId) |
|
| getReferencedEntityId (EntityId $fromId, PropertyId $propertyId, array $toIds) |
|
Actual implementations of various functions to access Wikibase functionality through Scribunto.
All functions in here are independent from the target language, meaning that this class can be instantiated without knowing the target language.
- Copyright
- GPL-2.0-or-later
- Author
- Jens Ohlig < jens..nosp@m.ohli.nosp@m.g@wik.nosp@m.imed.nosp@m.ia.de >
-
Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >
◆ __construct()
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::__construct |
( |
SiteLinkLookup | $siteLinkLookup, |
|
|
EntityIdLookup | $entityIdLookup, |
|
|
SettingsArray | $settings, |
|
|
UsageAccumulator | $usageAccumulator, |
|
|
EntityIdParser | $entityIdParser, |
|
|
TermLookup | $termLookup, |
|
|
ContentLanguages | $termsLanguages, |
|
|
ReferencedEntityIdLookup | $referencedEntityIdLookup, |
|
|
TitleFormatter | $titleFormatter, |
|
|
TitleParser | $titleParser, |
|
|
string | $siteId, |
|
|
RevisionBasedEntityRedirectTargetLookup | $redirectTargetLookup, |
|
|
EntityLookup | $entityLookup ) |
◆ getDescriptionByLanguage()
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::getDescriptionByLanguage |
( |
string | $prefixedEntityId, |
|
|
string | $languageCode ) |
- Parameters
-
string | $prefixedEntityId | |
string | $languageCode | |
- Returns
- ?string|null Null if language code invalid or entity couldn't be found/ no description present.
◆ getEntityId()
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::getEntityId |
( |
| $pageTitle, |
|
|
| $globalSiteId ) |
Get entity ID from page title and optionally global site ID.
- Parameters
-
string | $pageTitle | |
string | null | $globalSiteId | |
- Returns
- string|null
◆ getLabelByLanguage()
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::getLabelByLanguage |
( |
string | $prefixedEntityId, |
|
|
string | $languageCode ) |
- Parameters
-
string | $prefixedEntityId | |
string | $languageCode | |
- Returns
- ?string|null Null if language code invalid or entity couldn't be found/ no label present.
◆ getReferencedEntityId()
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::getReferencedEntityId |
( |
EntityId | $fromId, |
|
|
PropertyId | $propertyId, |
|
|
array | $toIds ) |
- Parameters
-
EntityId | $fromId | |
PropertyId | $propertyId | |
EntityId[] | $toIds | |
- Returns
- string|null|bool Serialization of the referenced entity id, if one could be found. Null if none of the given entities is referenced. False if the search for a referenced entity had to be aborted due to resource limits, or an error.
◆ getSetting()
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::getSetting |
( |
| $setting | ) |
|
◆ getSiteLinkPageName()
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::getSiteLinkPageName |
( |
| $prefixedItemId, |
|
|
| $globalSiteId ) |
- Parameters
-
string | $prefixedItemId | |
string | null | $globalSiteId | |
- Returns
- string|null Null if no site link found.
◆ isValidEntityId()
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::isValidEntityId |
( |
| $entityIdSerialization | ) |
|
Is this a valid (parseable) entity id.
- Parameters
-
string | $entityIdSerialization | |
- Returns
- bool
◆ normalizePageTitle()
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::normalizePageTitle |
( |
| $pageTitle | ) |
|
|
private |
◆ trackUsageForTitleOrSitelink()
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::trackUsageForTitleOrSitelink |
( |
string | $globalSiteId, |
|
|
EntityId | $entityId ) |
|
private |
◆ $entityIdLookup
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$entityIdLookup |
|
private |
◆ $entityIdParser
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$entityIdParser |
|
private |
◆ $entityLookup
EntityLookup Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$entityLookup |
|
private |
◆ $redirectTargetLookup
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$redirectTargetLookup |
|
private |
◆ $referencedEntityIdLookup
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$referencedEntityIdLookup |
|
private |
◆ $settings
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$settings |
|
private |
◆ $siteId
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$siteId |
|
private |
◆ $siteLinkLookup
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$siteLinkLookup |
|
private |
◆ $termLookup
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$termLookup |
|
private |
◆ $termsLanguages
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$termsLanguages |
|
private |
◆ $titleFormatter
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$titleFormatter |
|
private |
◆ $titleParser
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$titleParser |
|
private |
◆ $usageAccumulator
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$usageAccumulator |
|
private |
The documentation for this class was generated from the following file: