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, $siteId) |
|
| getEntityId ( $pageTitle, $globalSiteId) |
| Get entity ID from page title and optionally global site ID. More...
|
|
| isValidEntityId ( $entityIdSerialization) |
| Is this a valid (parseable) entity id. More...
|
|
| getLabelByLanguage ( $prefixedEntityId, $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, |
|
|
|
$siteId |
|
) |
| |
- Parameters
-
SiteLinkLookup | $siteLinkLookup | |
EntityIdLookup | $entityIdLookup | |
SettingsArray | $settings | |
UsageAccumulator | $usageAccumulator | |
EntityIdParser | $entityIdParser | |
TermLookup | $termLookup | |
ContentLanguages | $termsLanguages | |
ReferencedEntityIdLookup | $referencedEntityIdLookup | |
TitleFormatter | $titleFormatter | |
TitleParser | $titleParser | |
string | $siteId | |
◆ 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 |
( |
|
$prefixedEntityId, |
|
|
|
$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.
◆ 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 |
◆ $entityIdLookup
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$entityIdLookup |
|
private |
◆ $entityIdParser
Wikibase\Client\DataAccess\Scribunto\WikibaseLanguageIndependentLuaBindings::$entityIdParser |
|
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: