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 (string $prefixedEntityId) | |
Wrapper for getEntity in EntityAccessor. More... | |
getReferencedEntityId (string $prefixedFromEntityId, string $prefixedPropertyId, array $prefixedToIds) | |
Wrapper for getReferencedEntityId in WikibaseLanguageIndependentLuaBindings. More... | |
entityExists (string $prefixedEntityId) | |
Wrapper for entityExists in EntityAccessor. More... | |
getEntityStatements (string $prefixedEntityId, string $propertyId, string $rank) | |
Wrapper for getEntityStatements in EntityAccessor. More... | |
getEntityId (string $pageTitle, string $globalSiteId=null) | |
Wrapper for getEntityId in WikibaseLanguageIndependentLuaBindings. More... | |
getEntityUrl (string $entityIdSerialization) | |
setRepoLinker (RepoLinker $repoLinker) | |
getLabel (string $prefixedEntityId) | |
Wrapper for getLabel in WikibaseLanguageDependentLuaBindings. More... | |
getLabelByLanguage (string $prefixedEntityId, string $languageCode) | |
Wrapper for getLabelByLanguage in WikibaseLanguageIndependentLuaBindings. More... | |
getDescription (string $prefixedEntityId) | |
Wrapper for getDescription in WikibaseLanguageDependentLuaBindings. More... | |
getSiteLinkPageName (string $prefixedItemId, ?string $globalSiteId) | |
Wrapper for getSiteLinkPageName in WikibaseLanguageIndependentLuaBindings. More... | |
isValidEntityId (string $entityIdSerialization) | |
Wrapper for WikibaseLanguageIndependentLuaBindings::isValidEntityId. More... | |
renderSnak (array $snakSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnak, set to output wikitext escaped plain text. More... | |
formatValue (array $snakSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnak, set to output rich wikitext. More... | |
renderSnaks (array $snaksSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output wikitext escaped plain text. More... | |
formatValues (array $snaksSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output rich wikitext. More... | |
resolvePropertyId (string $propertyLabelOrId) | |
Wrapper for PropertyIdResolver. More... | |
orderProperties (array $propertyIds) | |
getPropertyOrder () | |
Return the order of properties as provided by the PropertyOrderProvider. More... | |
incrementStatsKey (string $key) | |
Increment the given stats key. More... | |
getEntityModuleName (string $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 (string $type) | |
getLanguageFallbackChain () | |
getPropertyIdResolver () | |
getLanguage () | |
Returns the language to use. More... | |
getLuaFunctionCallTracker () | |
allowDataAccessInUserLanguage () | |
newEntityAccessor () | |
newSnakSerializationRenderer (string $type) | |
newLanguageDependentLuaBindings () | |
newLanguageIndependentLuaBindings () | |
getEntityIdParser () | |
parseUserGivenEntityId (string $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 | ( | string | $prefixedEntityId | ) |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::formatValue | ( | array | $snakSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnak, set to output rich wikitext.
ScribuntoException |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::formatValues | ( | array | $snaksSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output rich wikitext.
array[] | $snaksSerialization |
ScribuntoException |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getDescription | ( | string | $prefixedEntityId | ) |
Wrapper for getDescription in WikibaseLanguageDependentLuaBindings.
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getEntity | ( | string | $prefixedEntityId | ) |
Wrapper for getEntity in EntityAccessor.
ScribuntoException |
|
private |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getEntityId | ( | string | $pageTitle, |
string | $globalSiteId = null |
||
) |
Wrapper for getEntityId in WikibaseLanguageIndependentLuaBindings.
|
private |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getEntityModuleName | ( | string | $prefixedEntityId | ) |
Get the entity module name to use for the entity with this ID.
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getEntityStatements | ( | string | $prefixedEntityId, |
string | $propertyId, | ||
string | $rank | ||
) |
Wrapper for getEntityStatements in EntityAccessor.
string | $rank | Which statements to include. Either "best" or "all". |
ScribuntoException |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getEntityUrl | ( | string | $entityIdSerialization | ) |
string | $entityIdSerialization | entity ID serialization |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getLabel | ( | string | $prefixedEntityId | ) |
Wrapper for getLabel in WikibaseLanguageDependentLuaBindings.
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getLabelByLanguage | ( | string | $prefixedEntityId, |
string | $languageCode | ||
) |
Wrapper for getLabelByLanguage in WikibaseLanguageIndependentLuaBindings.
|
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 | ( | string | $prefixedFromEntityId, |
string | $prefixedPropertyId, | ||
array | $prefixedToIds | ||
) |
Wrapper for getReferencedEntityId in WikibaseLanguageIndependentLuaBindings.
string[] | $prefixedToIds |
ScribuntoException |
|
private |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getSiteLinkPageName | ( | string | $prefixedItemId, |
?string | $globalSiteId | ||
) |
Wrapper for getSiteLinkPageName in WikibaseLanguageIndependentLuaBindings.
|
private |
string | $type | One of DataAccessSnakFormatterFactory::TYPE_* |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getUsageAccumulator | ( | ) |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::incrementStatsKey | ( | string | $key | ) |
Increment the given stats key.
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::isValidEntityId | ( | string | $entityIdSerialization | ) |
Wrapper for WikibaseLanguageIndependentLuaBindings::isValidEntityId.
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 | ( | array | $snakSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnak, set to output wikitext escaped plain text.
ScribuntoException |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::renderSnaks | ( | array | $snaksSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output wikitext escaped plain text.
array[] | $snaksSerialization |
ScribuntoException |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::resolvePropertyId | ( | string | $propertyLabelOrId | ) |
Wrapper for PropertyIdResolver.
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 |