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. | |
getEntity (string $prefixedEntityId) | |
Wrapper for getEntity in EntityAccessor. | |
getReferencedEntityId (string $prefixedFromEntityId, string $prefixedPropertyId, array $prefixedToIds) | |
Wrapper for getReferencedEntityId in WikibaseLanguageIndependentLuaBindings. | |
entityExists (string $prefixedEntityId) | |
Wrapper for entityExists in EntityAccessor. | |
getEntityStatements (string $prefixedEntityId, string $propertyId, string $rank) | |
Wrapper for getEntityStatements in EntityAccessor. | |
getEntityId (string $pageTitle, string $globalSiteId=null) | |
Wrapper for getEntityId in WikibaseLanguageIndependentLuaBindings. | |
getEntityUrl (string $entityIdSerialization) | |
setRepoLinker (RepoLinker $repoLinker) | |
getLabel (string $prefixedEntityId) | |
Wrapper for getLabel in WikibaseLanguageDependentLuaBindings. | |
getLabelByLanguage (string $prefixedEntityId, string $languageCode) | |
Wrapper for getLabelByLanguage in WikibaseLanguageIndependentLuaBindings. | |
getDescription (string $prefixedEntityId) | |
Wrapper for getDescription in WikibaseLanguageDependentLuaBindings. | |
getDescriptionByLanguage (string $prefixedEntityId, string $languageCode) | |
Wrapper for getDescriptionByLanguage in WikibaseLanguageIndependentLuaBindings. | |
getSiteLinkPageName (string $prefixedItemId, ?string $globalSiteId) | |
Wrapper for getSiteLinkPageName in WikibaseLanguageIndependentLuaBindings. | |
getBadges (string $prefixedEntityId, ?string $globalSiteId) | |
Wrapper for getBadges in WikibaseLanguageIndependentLuaBindings. | |
isValidEntityId (string $entityIdSerialization) | |
Wrapper for WikibaseLanguageIndependentLuaBindings::isValidEntityId. | |
renderSnak (array $snakSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnak, set to output wikitext escaped plain text. | |
formatValue (array $snakSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnak, set to output rich wikitext. | |
renderSnaks (array $snaksSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output wikitext escaped plain text. | |
formatValues (array $snaksSerialization) | |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output rich wikitext. | |
resolvePropertyId (string $propertyLabelOrId) | |
Wrapper for PropertyIdResolver. | |
orderProperties (array $propertyIds) | |
getPropertyOrder () | |
Return the order of properties as provided by the PropertyOrderProvider. | |
incrementStatsKey (string $key) | |
Increment the given stats key. | |
getEntityModuleName (string $prefixedEntityId) | |
Get the entity module name to use for the entity with this ID. | |
setPropertyOrderProvider (PropertyOrderProvider $propertyOrderProvider) | |
getParserOutput () | |
Private Member Functions | |
getLanguageIndependentLuaBindings () | |
getLanguageDependentLuaBindings () | |
getEntityAccessor () | |
getSnakSerializationRenderer (string $type) | |
getLanguageFallbackChain () | |
getPropertyIdResolver () | |
getLanguage () | |
Returns the language to use. | |
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 | ) |
Wrapper for entityExists in EntityAccessor.
ScribuntoException |
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::getBadges | ( | string | $prefixedEntityId, |
?string | $globalSiteId ) |
Wrapper for getBadges in WikibaseLanguageIndependentLuaBindings.
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getDescription | ( | string | $prefixedEntityId | ) |
Wrapper for getDescription in WikibaseLanguageDependentLuaBindings.
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getDescriptionByLanguage | ( | string | $prefixedEntityId, |
string | $languageCode ) |
Wrapper for getDescriptionByLanguage in WikibaseLanguageIndependentLuaBindings.
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 | $prefixedEntityId | |
string | $propertyId | |
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 |
Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary::getParserOutput | ( | ) |
|
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 | $prefixedFromEntityId | |
string | $prefixedPropertyId | |
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 |
ScribuntoException |
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 |