|
Wikibase
MediaWiki Wikibase extension
|
Registers and defines functions to access Wikibase through the Scribunto extension. More...
Inheritance diagram for Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary:
Collaboration diagram for Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary:Public Member Functions | |
| getUsageAccumulator () | |
| register () | |
| Register mw.wikibase.lua library. | |
| getEntity ( $prefixedEntityId) | |
| Wrapper for getEntity in EntityAccessor. | |
| getReferencedEntityId ( $prefixedFromEntityId, $prefixedPropertyId, $prefixedToIds) | |
| Wrapper for getReferencedEntityId in WikibaseLanguageIndependentLuaBindings. | |
| entityExists ( $prefixedEntityId) | |
| Wrapper for entityExists in EntityAccessor. | |
| getEntityStatements ( $prefixedEntityId, $propertyId, $rank) | |
| Wrapper for getEntityStatements in EntityAccessor. | |
| getEntityId ( $pageTitle, $globalSiteId=null) | |
| Wrapper for getEntityId in WikibaseLanguageIndependentLuaBindings. | |
| getSetting ( $setting) | |
| Wrapper for getSetting in WikibaseLanguageIndependentLuaBindings. | |
| getEntityUrl ( $entityIdSerialization) | |
| setRepoLinker (RepoLinker $repoLinker) | |
| getLabel ( $prefixedEntityId) | |
| Wrapper for getLabel in WikibaseLanguageDependentLuaBindings. | |
| getLabelByLanguage ( $prefixedEntityId, $languageCode) | |
| Wrapper for getLabelByLanguage in WikibaseLanguageIndependentLuaBindings. | |
| getDescription ( $prefixedEntityId) | |
| Wrapper for getDescription in WikibaseLanguageDependentLuaBindings. | |
| getSiteLinkPageName ( $prefixedItemId, $globalSiteId) | |
| Wrapper for getSiteLinkPageName in WikibaseLanguageIndependentLuaBindings. | |
| isValidEntityId ( $entityIdSerialization) | |
| Wrapper for WikibaseLanguageIndependentLuaBindings::isValidEntityId. | |
| renderSnak ( $snakSerialization) | |
| Wrapper for SnakSerializationRenderer::renderSnak, set to output wikitext escaped plain text. | |
| formatValue ( $snakSerialization) | |
| Wrapper for SnakSerializationRenderer::renderSnak, set to output rich wikitext. | |
| renderSnaks ( $snaksSerialization) | |
| Wrapper for SnakSerializationRenderer::renderSnaks, set to output wikitext escaped plain text. | |
| formatValues ( $snaksSerialization) | |
| Wrapper for SnakSerializationRenderer::renderSnaks, set to output rich wikitext. | |
| resolvePropertyId ( $propertyLabelOrId) | |
| Wrapper for PropertyIdResolver. | |
| orderProperties (array $propertyIds) | |
| getPropertyOrder () | |
| Return the order of properties as provided by the PropertyOrderProvider. | |
| incrementStatsKey ( $key) | |
| Increment the given stats key. | |
| getEntityModuleName ( $prefixedEntityId) | |
| Get the entity module name to use for the entity with this ID. | |
| setPropertyOrderProvider (PropertyOrderProvider $propertyOrderProvider) | |
Private Member Functions | |
| getLanguageIndependentLuaBindings () | |
| getLanguageDependentLuaBindings () | |
| getEntityAccessor () | |
| getSnakSerializationRenderer ( $type) | |
| getLanguageFallbackChain () | |
| getPropertyIdResolver () | |
| getLanguage () | |
| Returns the language to use. | |
| getLuaFunctionCallTracker () | |
| allowDataAccessInUserLanguage () | |
| newEntityAccessor () | |
| newSnakSerializationRenderer ( $type) | |
| newLanguageDependentLuaBindings () | |
| newLanguageIndependentLuaBindings () | |
| getEntityIdParser () | |
| parseUserGivenEntityId ( $idSerialization) | |
| getRepoLinker () | |
| getPropertyOrderProvider () | |
| getLuaEntityModules () | |
Private Attributes | |
| $languageIndependentLuaBindings = null | |
| $languageDependentLuaBindings = null | |
| $entityAccessor = null | |
| $snakSerializationRenderers = [] | |
| $fallbackChain = null | |
| $usageAccumulator = null | |
| $propertyIdResolver = null | |
| $propertyOrderProvider = null | |
| $entityIdParser = null | |
| $repoLinker = null | |
| $luaFunctionCallTracker = null | |
| $luaEntityModules = null | |
Registers and defines functions to access Wikibase through the Scribunto extension.
|
private |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::entityExists | ( | $prefixedEntityId | ) |
Wrapper for entityExists in EntityAccessor.
| string | $prefixedEntityId |
| ScribuntoException |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::formatValue | ( | $snakSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnak, set to output rich wikitext.
| array | $snakSerialization |
| ScribuntoException |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::formatValues | ( | $snaksSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output rich wikitext.
| array[] | $snaksSerialization |
| ScribuntoException |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getDescription | ( | $prefixedEntityId | ) |
Wrapper for getDescription in WikibaseLanguageDependentLuaBindings.
| string | $prefixedEntityId |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getEntity | ( | $prefixedEntityId | ) |
Wrapper for getEntity in EntityAccessor.
| string | $prefixedEntityId |
| ScribuntoException |
|
private |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getEntityId | ( | $pageTitle, | |
$globalSiteId = null |
|||
| ) |
Wrapper for getEntityId in WikibaseLanguageIndependentLuaBindings.
| string | $pageTitle | |
| string | null | $globalSiteId |
|
private |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getEntityModuleName | ( | $prefixedEntityId | ) |
Get the entity module name to use for the entity with this ID.
| string | $prefixedEntityId |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getEntityStatements | ( | $prefixedEntityId, | |
| $propertyId, | |||
| $rank | |||
| ) |
Wrapper for getEntityStatements in EntityAccessor.
| string | $prefixedEntityId | |
| string | $propertyId | |
| string | $rank | Which statements to include. Either "best" or "all". |
| ScribuntoException |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getEntityUrl | ( | $entityIdSerialization | ) |
| string | $entityIdSerialization | entity ID serialization |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getLabel | ( | $prefixedEntityId | ) |
Wrapper for getLabel in WikibaseLanguageDependentLuaBindings.
| string | $prefixedEntityId |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getLabelByLanguage | ( | $prefixedEntityId, | |
| $languageCode | |||
| ) |
Wrapper for getLabelByLanguage in WikibaseLanguageIndependentLuaBindings.
| string | $prefixedEntityId | |
| string | $languageCode |
|
private |
Returns the language to use.
If we are on a multilingual wiki (allowDataAccessInUserLanguage is true) this will be the user's interface language, otherwise it will be the content language. In a perfect world, this would equal Parser::getTargetLanguage.
This can probably be removed after T114640 has been implemented.
Please note, that this splits the parser cache by user language, if allowDataAccessInUserLanguage is true.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getPropertyOrder | ( | ) |
Return the order of properties as provided by the PropertyOrderProvider.
|
private |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getReferencedEntityId | ( | $prefixedFromEntityId, | |
| $prefixedPropertyId, | |||
| $prefixedToIds | |||
| ) |
Wrapper for getReferencedEntityId in WikibaseLanguageIndependentLuaBindings.
| string | $prefixedFromEntityId | |
| string | $prefixedPropertyId | |
| string[] | $prefixedToIds |
| ScribuntoException |
|
private |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getSetting | ( | $setting | ) |
Wrapper for getSetting in WikibaseLanguageIndependentLuaBindings.
| string | $setting |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getSiteLinkPageName | ( | $prefixedItemId, | |
| $globalSiteId | |||
| ) |
Wrapper for getSiteLinkPageName in WikibaseLanguageIndependentLuaBindings.
| string | $prefixedItemId | |
| string | null | $globalSiteId |
|
private |
| string | $type | One of DataAccessSnakFormatterFactory::TYPE_* |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getUsageAccumulator | ( | ) |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::incrementStatsKey | ( | $key | ) |
Increment the given stats key.
| string | $key |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::isValidEntityId | ( | $entityIdSerialization | ) |
Wrapper for WikibaseLanguageIndependentLuaBindings::isValidEntityId.
| string | $entityIdSerialization |
| ScribuntoException |
|
private |
|
private |
|
private |
|
private |
| string | $type | One of DataAccessSnakFormatterFactory::TYPE_* |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::orderProperties | ( | array | $propertyIds | ) |
| string[] | $propertyIds |
|
private |
ScribuntoException
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::register | ( | ) |
Register mw.wikibase.lua library.
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::renderSnak | ( | $snakSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnak, set to output wikitext escaped plain text.
| array | $snakSerialization |
| ScribuntoException |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::renderSnaks | ( | $snaksSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output wikitext escaped plain text.
| array[] | $snaksSerialization |
| ScribuntoException |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::resolvePropertyId | ( | $propertyLabelOrId | ) |
Wrapper for PropertyIdResolver.
| string | $propertyLabelOrId |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::setPropertyOrderProvider | ( | PropertyOrderProvider | $propertyOrderProvider | ) |
| Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::setRepoLinker | ( | RepoLinker | $repoLinker | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |