Registers and defines functions to access Wikibase through the Scribunto extension.
More...
|
| | getUsageAccumulator () |
| |
| | addStatementUsage (string $entityId, string $propertyId) |
| | Add a statement usage without qualifiers and/or references (called once specific statements are accessed).
|
| |
| | addStatementWithQualOrRefUsage (string $entityId, string $propertyId) |
| | Add a statement usage with qualifiers and/or references as well as mainsnak (called once specific statements are accessed).
|
| |
| | addLabelUsage (string $entityId, ?string $langCode) |
| | Add a label usage (called once specific labels are accessed).
|
| |
| | addDescriptionUsage (string $entityId, ?string $langCode) |
| | Add a description usage (called once specific descriptions are accessed).
|
| |
| | addTitleOrSiteLinksUsage (string $entityId, ?string $requestedSiteId) |
| | Add a sitelinks usage (called once specific sitelinks are accessed).
|
| |
| | addAliasUsage (string $entityId, ?string $langCode) |
| | Add an alias usage (called once specific aliases are accessed).
|
| |
| | addOtherUsage (string $entityId) |
| | Add an other (O) usage (called once the otherwise not covered aspect is used).
|
| |
| | register () |
| | Register mw.wikibase.entity.lua library.
|
| |
| | formatPropertyValues (string $entityId, string $propertyLabelOrId, ?array $acceptableRanks) |
| | Format the main Snaks belonging to a Statement (which is identified by a NumericPropertyId or the label of a Property) as wikitext escaped plain text.
|
| |
| | formatStatements (string $entityId, string $propertyLabelOrId, ?array $acceptableRanks) |
| | Format the main Snaks belonging to a Statement (which is identified by a NumericPropertyId or the label of a Property) as rich wikitext.
|
| |
| | incrementStatsKey (string $key, string $module) |
| | Increment the given stats key.
|
| |
| | getParserOutput () |
| |
Registers and defines functions to access Wikibase through the Scribunto extension.
- Copyright
- GPL-2.0-or-later
- Author
- Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >
-
Andrew Hall
◆ addAliasUsage()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::addAliasUsage |
( |
string | $entityId, |
|
|
?string | $langCode ) |
Add an alias usage (called once specific aliases are accessed).
- Parameters
-
| string | $entityId | The Entity from which the aliases were accessed. |
| string | null | $langCode | Language code of the aliases accessed. |
◆ addDescriptionUsage()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::addDescriptionUsage |
( |
string | $entityId, |
|
|
?string | $langCode ) |
Add a description usage (called once specific descriptions are accessed).
- Parameters
-
| string | $entityId | The Entity from which the descriptions were accessed. |
| string | null | $langCode | Language code of the descriptions accessed. |
◆ addLabelUsage()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::addLabelUsage |
( |
string | $entityId, |
|
|
?string | $langCode ) |
Add a label usage (called once specific labels are accessed).
- Parameters
-
| string | $entityId | The Entity from which the labels were accessed. |
| string | null | $langCode | Language code of the labels accessed. |
◆ addOtherUsage()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::addOtherUsage |
( |
string | $entityId | ) |
|
Add an other (O) usage (called once the otherwise not covered aspect is used).
- Parameters
-
| string | $entityId | The Entity from which something was accessed. |
◆ addStatementUsage()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::addStatementUsage |
( |
string | $entityId, |
|
|
string | $propertyId ) |
Add a statement usage without qualifiers and/or references (called once specific statements are accessed).
- Parameters
-
| string | $entityId | The Entity from which the statements were accessed. |
| string | $propertyId | Property id of the statements accessed. |
◆ addStatementWithQualOrRefUsage()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::addStatementWithQualOrRefUsage |
( |
string | $entityId, |
|
|
string | $propertyId ) |
Add a statement usage with qualifiers and/or references as well as mainsnak (called once specific statements are accessed).
- Parameters
-
| string | $entityId | The Entity from which the statements were accessed. |
| string | $propertyId | Property id of the statements accessed. |
◆ addTitleOrSiteLinksUsage()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::addTitleOrSiteLinksUsage |
( |
string | $entityId, |
|
|
?string | $requestedSiteId ) |
Add a sitelinks usage (called once specific sitelinks are accessed).
- Parameters
-
| string | $entityId | The Entity from which the sitelinks were accessed. |
| string | null | $requestedSiteId | The site for which a specific sitelink is requested. |
◆ allowDataAccessInUserLanguage()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::allowDataAccessInUserLanguage |
( |
| ) |
|
|
private |
◆ formatPropertyValues()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::formatPropertyValues |
( |
string | $entityId, |
|
|
string | $propertyLabelOrId, |
|
|
?array | $acceptableRanks ) |
Format the main Snaks belonging to a Statement (which is identified by a NumericPropertyId or the label of a Property) as wikitext escaped plain text.
- Parameters
-
| string | $entityId | |
| string | $propertyLabelOrId | |
| int[] | null | $acceptableRanks | |
- Exceptions
-
- Returns
- string[]|null[]
◆ formatStatements()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::formatStatements |
( |
string | $entityId, |
|
|
string | $propertyLabelOrId, |
|
|
?array | $acceptableRanks ) |
Format the main Snaks belonging to a Statement (which is identified by a NumericPropertyId or the label of a Property) as rich wikitext.
- Parameters
-
| string | $entityId | |
| string | $propertyLabelOrId | |
| int[] | null | $acceptableRanks | |
- Exceptions
-
- Returns
- string[]|null[]
◆ getImplementation()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::getImplementation |
( |
| ) |
|
|
private |
◆ getLanguage()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::getLanguage |
( |
| ) |
|
|
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.
◆ getLuaFunctionCallTracker()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::getLuaFunctionCallTracker |
( |
| ) |
|
|
private |
◆ getParserOutput()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::getParserOutput |
( |
| ) |
|
◆ getUsageAccumulator()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::getUsageAccumulator |
( |
| ) |
|
◆ incrementStatsKey()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::incrementStatsKey |
( |
string | $key, |
|
|
string | $module ) |
Increment the given stats key.
◆ newImplementation()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::newImplementation |
( |
| ) |
|
|
private |
◆ newRichWikitextSnakFormatter()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::newRichWikitextSnakFormatter |
( |
DataAccessSnakFormatterFactory | $snakFormatterFactory, |
|
|
Language | $lang ) |
|
private |
◆ register()
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::register |
( |
| ) |
|
Register mw.wikibase.entity.lua library.
- Returns
- array
◆ $luaFunctionCallTracker
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::$luaFunctionCallTracker = null |
|
private |
◆ $wbLibrary
| Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary::$wbLibrary |
|
private |
The documentation for this class was generated from the following file: