Wikibase
MediaWiki Wikibase extension
|
Registers and defines functions to access Wikibase through the Scribunto extension. More...
Public Member Functions | |
getUsageAccumulator () | |
register () | |
Register mw.wikibase.lua library. More... | |
getEntity ( $prefixedEntityId) | |
Wrapper for getEntity in EntityAccessor. More... | |
getReferencedEntityId ( $prefixedFromEntityId, $prefixedPropertyId, $prefixedToIds) | |
Wrapper for getReferencedEntityId in WikibaseLanguageIndependentLuaBindings. More... | |
entityExists ( $prefixedEntityId) | |
Wrapper for entityExists in EntityAccessor. More... | |
getEntityStatements ( $prefixedEntityId, $propertyId, $rank) | |
Wrapper for getEntityStatements in EntityAccessor. More... | |
getEntityId ( $pageTitle, $globalSiteId=null) | |
Wrapper for getEntityId in WikibaseLanguageIndependentLuaBindings. More... | |
getEntityUrl ( $entityIdSerialization) | |
setRepoLinker (RepoLinker $repoLinker) | |
getLabel ( $prefixedEntityId) | |
Wrapper for getLabel in WikibaseLanguageDependentLuaBindings. More... | |
getLabelByLanguage ( $prefixedEntityId, $languageCode) | |
Wrapper for getLabelByLanguage in WikibaseLanguageIndependentLuaBindings. More... | |
getDescription ( $prefixedEntityId) | |
Wrapper for getDescription in WikibaseLanguageDependentLuaBindings. More... | |
getSiteLinkPageName ( $prefixedItemId, $globalSiteId) | |
Wrapper for getSiteLinkPageName in WikibaseLanguageIndependentLuaBindings. More... | |
isValidEntityId ( $entityIdSerialization) | |
Wrapper for WikibaseLanguageIndependentLuaBindings::isValidEntityId. More... | |
renderSnak ( $snakSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnak, set to output wikitext escaped plain text. More... | |
formatValue ( $snakSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnak, set to output rich wikitext. More... | |
renderSnaks ( $snaksSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output wikitext escaped plain text. More... | |
formatValues ( $snaksSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output rich wikitext. More... | |
resolvePropertyId ( $propertyLabelOrId) | |
Wrapper for PropertyIdResolver. More... | |
orderProperties (array $propertyIds) | |
getPropertyOrder () | |
Return the order of properties as provided by the PropertyOrderProvider. More... | |
incrementStatsKey ( $key) | |
Increment the given stats key. More... | |
getEntityModuleName ( $prefixedEntityId) | |
Get the entity module name to use for the entity with this ID. More... | |
setPropertyOrderProvider (PropertyOrderProvider $propertyOrderProvider) | |
Private Member Functions | |
getLanguageIndependentLuaBindings () | |
getLanguageDependentLuaBindings () | |
getEntityAccessor () | |
getSnakSerializationRenderer ( $type) | |
getLanguageFallbackChain () | |
getPropertyIdResolver () | |
getLanguage () | |
Returns the language to use. More... | |
getLuaFunctionCallTracker () | |
allowDataAccessInUserLanguage () | |
newEntityAccessor () | |
newSnakSerializationRenderer ( $type) | |
newLanguageDependentLuaBindings () | |
newLanguageIndependentLuaBindings () | |
getEntityIdParser () | |
parseUserGivenEntityId ( $idSerialization) | |
getRepoLinker () | |
getPropertyOrderProvider () | |
getLuaEntityModules () | |
Private Attributes | |
$languageIndependentLuaBindings = null | |
$languageDependentLuaBindings = null | |
$entityAccessor = null | |
$snakSerializationRenderers = [] | |
$termFallbackChain = 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::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 |
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 | ) |
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 |