Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings Class Reference

Actual implementations of the functions to access Wikibase through the Scribunto extension. More...

+ Collaboration diagram for Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings:

Public Member Functions

 __construct (StatementTransclusionInteractor $plainTextTransclusionInteractor, StatementTransclusionInteractor $richWikitextTransclusionInteractor, EntityIdParser $entityIdParser, ContentLanguages $termsLanguages, UsageAccumulator $usageAccumulator)
 
 formatPropertyValues (string $entityId, string $propertyLabelOrId, ?array $acceptableRanks=null)
 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=null)
 Format the main Snaks belonging to a Statement (which is identified by a NumericPropertyId or the label of a Property) as rich wikitext.
 
 addStatementUsage (string $entityId, string $propertyId)
 Add a statement usage (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).
 
 addOtherUsage (string $entityId)
 Add a other usage.
 
 addSiteLinksUsage (string $entityId)
 Add a sitelink usage (called once any sitelink is accessed).
 

Private Attributes

StatementTransclusionInteractor $plainTextTransclusionInteractor
 
StatementTransclusionInteractor $richWikitextTransclusionInteractor
 
EntityIdParser $entityIdParser
 
UsageAccumulator $usageAccumulator
 
ContentLanguages $termsLanguages
 

Detailed Description

Actual implementations of the functions to access Wikibase through the Scribunto extension.

Author
Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::__construct ( StatementTransclusionInteractor $plainTextTransclusionInteractor,
StatementTransclusionInteractor $richWikitextTransclusionInteractor,
EntityIdParser $entityIdParser,
ContentLanguages $termsLanguages,
UsageAccumulator $usageAccumulator )

Member Function Documentation

◆ addDescriptionUsage()

Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::addDescriptionUsage ( string $entityId,
?string $langCode )

Add a description usage (called once specific descriptions are accessed).

Parameters
string$entityIdThe Entity from which the descriptions were accessed.
string | null$langCodeLanguage code the descriptions accessed.

◆ addLabelUsage()

Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::addLabelUsage ( string $entityId,
?string $langCode )

Add a label usage (called once specific labels are accessed).

Parameters
string$entityIdThe Entity from which the labels were accessed.
string | null$langCodeLanguage code the labels accessed.

◆ addOtherUsage()

Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::addOtherUsage ( string $entityId)

Add a other usage.

Parameters
string$entityIdThe Entity from which something was accessed.

◆ addSiteLinksUsage()

Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::addSiteLinksUsage ( string $entityId)

Add a sitelink usage (called once any sitelink is accessed).

Parameters
string$entityIdThe Entity from which the sitelinks were accessed.

◆ addStatementUsage()

Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::addStatementUsage ( string $entityId,
string $propertyId )

Add a statement usage (called once specific statements are accessed).

Parameters
string$entityIdThe Entity from which the statements were accessed.
string$propertyIdProperty id of the statements accessed.

◆ formatPropertyValues()

Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::formatPropertyValues ( string $entityId,
string $propertyLabelOrId,
?array $acceptableRanks = null )

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
Returns
string Wikitext

◆ formatStatements()

Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::formatStatements ( string $entityId,
string $propertyLabelOrId,
?array $acceptableRanks = null )

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
Returns
string Wikitext

Member Data Documentation

◆ $entityIdParser

EntityIdParser Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$entityIdParser
private

◆ $plainTextTransclusionInteractor

StatementTransclusionInteractor Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$plainTextTransclusionInteractor
private

◆ $richWikitextTransclusionInteractor

StatementTransclusionInteractor Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$richWikitextTransclusionInteractor
private

◆ $termsLanguages

ContentLanguages Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$termsLanguages
private

◆ $usageAccumulator

UsageAccumulator Wikibase\Client\DataAccess\Scribunto\WikibaseLuaEntityBindings::$usageAccumulator
private

The documentation for this class was generated from the following file: