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\WikibaseLibrary::entityExists | ( | string | $prefixedEntityId | ) |
Wrapper for entityExists in EntityAccessor.
ScribuntoException |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::formatValue | ( | array | $snakSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnak, set to output rich wikitext.
ScribuntoException |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::formatValues | ( | array | $snaksSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output rich wikitext.
array[] | $snaksSerialization |
ScribuntoException |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::getBadges | ( | string | $prefixedEntityId, |
?string | $globalSiteId ) |
Wrapper for getBadges in WikibaseLanguageIndependentLuaBindings.
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::getDescription | ( | string | $prefixedEntityId | ) |
Wrapper for getDescription in WikibaseLanguageDependentLuaBindings.
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::getDescriptionByLanguage | ( | string | $prefixedEntityId, |
string | $languageCode ) |
Wrapper for getDescriptionByLanguage in WikibaseLanguageIndependentLuaBindings.
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::getEntity | ( | string | $prefixedEntityId | ) |
Wrapper for getEntity in EntityAccessor.
ScribuntoException |
|
private |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::getEntityId | ( | string | $pageTitle, |
?string | $globalSiteId = null ) |
Wrapper for getEntityId in WikibaseLanguageIndependentLuaBindings.
|
private |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::getEntityModuleName | ( | string | $prefixedEntityId | ) |
Get the entity module name to use for the entity with this ID.
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::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\WikibaseLibrary::getEntityUrl | ( | string | $entityIdSerialization | ) |
string | $entityIdSerialization | entity ID serialization |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::getLabel | ( | string | $prefixedEntityId | ) |
Wrapper for getLabel in WikibaseLanguageDependentLuaBindings.
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::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\WikibaseLibrary::getParserOutput | ( | ) |
|
private |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::getPropertyOrder | ( | ) |
Return the order of properties as provided by the PropertyOrderProvider.
|
private |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::getReferencedEntityId | ( | string | $prefixedFromEntityId, |
string | $prefixedPropertyId, | ||
array | $prefixedToIds ) |
Wrapper for getReferencedEntityId in WikibaseLanguageIndependentLuaBindings.
string | $prefixedFromEntityId | |
string | $prefixedPropertyId | |
string[] | $prefixedToIds |
ScribuntoException |
|
private |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::getSiteLinkPageName | ( | string | $prefixedItemId, |
?string | $globalSiteId ) |
Wrapper for getSiteLinkPageName in WikibaseLanguageIndependentLuaBindings.
|
private |
string | $type | One of DataAccessSnakFormatterFactory::TYPE_* |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::getUsageAccumulator | ( | ) |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::incrementStatsKey | ( | string | $key | ) |
Increment the given stats key.
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::isValidEntityId | ( | string | $entityIdSerialization | ) |
Wrapper for WikibaseLanguageIndependentLuaBindings::isValidEntityId.
ScribuntoException |
|
private |
|
private |
|
private |
|
private |
string | $type | One of DataAccessSnakFormatterFactory::TYPE_* |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::orderProperties | ( | array | $propertyIds | ) |
string[] | $propertyIds |
|
private |
ScribuntoException |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::register | ( | ) |
Register mw.wikibase.lua library.
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::renderSnak | ( | array | $snakSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnak, set to output wikitext escaped plain text.
ScribuntoException |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::renderSnaks | ( | array | $snaksSerialization | ) |
Wrapper for SnakSerializationRenderer::renderSnaks, set to output wikitext escaped plain text.
array[] | $snaksSerialization |
ScribuntoException |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::resolvePropertyId | ( | string | $propertyLabelOrId | ) |
Wrapper for PropertyIdResolver.
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::setPropertyOrderProvider | ( | PropertyOrderProvider | $propertyOrderProvider | ) |
Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary::setRepoLinker | ( | RepoLinker | $repoLinker | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |