Wikibase
MediaWiki Wikibase extension
Wikibase\Client\DataAccess\ParserFunctions\Runner Class Reference

Runner for the {{#property|…}} and {{#statements|…}} parser functions. More...

Public Member Functions

 __construct (StatementGroupRendererFactory $rendererFactory, SiteLinkLookup $siteLinkLookup, EntityIdParser $entityIdParser, RestrictedEntityLookup $restrictedEntityLookup, $siteId, $allowArbitraryDataAccess)
 
 runPropertyParserFunction (Parser $parser, PPFrame $frame, array $args, $type=DataAccessSnakFormatterFactory::TYPE_ESCAPED_PLAINTEXT)
 

Static Public Member Functions

static renderEscapedPlainText (Parser $parser, PPFrame $frame, array $args)
 
static renderRichWikitext (Parser $parser, PPFrame $frame, array $args)
 

Private Member Functions

 getEntityIdForStatementListProvider (Parser $parser, PPFrame $frame)
 
 getEntityIdFromString (Parser $parser, $entityIdString)
 Gets the entity and increments the expensive parser function count. More...
 
 buildResult ( $rendered)
 

Private Attributes

 $rendererFactory
 
 $siteLinkLookup
 
 $entityIdParser
 
 $restrictedEntityLookup
 
 $siteId
 
 $allowArbitraryDataAccess
 

Detailed Description

Runner for the {{#property|…}} and {{#statements|…}} parser functions.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\DataAccess\ParserFunctions\Runner::__construct ( StatementGroupRendererFactory  $rendererFactory,
SiteLinkLookup  $siteLinkLookup,
EntityIdParser  $entityIdParser,
RestrictedEntityLookup  $restrictedEntityLookup,
  $siteId,
  $allowArbitraryDataAccess 
)
Parameters
StatementGroupRendererFactory$rendererFactory
SiteLinkLookup$siteLinkLookup
EntityIdParser$entityIdParser
RestrictedEntityLookup$restrictedEntityLookup
string$siteId
bool$allowArbitraryDataAccess

Member Function Documentation

◆ buildResult()

Wikibase\Client\DataAccess\ParserFunctions\Runner::buildResult (   $rendered)
private
Parameters
string$renderedWikitext
Returns
array Wikitext in element 0, flags in named elements

◆ getEntityIdForStatementListProvider()

Wikibase\Client\DataAccess\ParserFunctions\Runner::getEntityIdForStatementListProvider ( Parser  $parser,
PPFrame  $frame 
)
private
Parameters
Parser$parser
PPFrame$frame
Returns
EntityId|null

◆ getEntityIdFromString()

Wikibase\Client\DataAccess\ParserFunctions\Runner::getEntityIdFromString ( Parser  $parser,
  $entityIdString 
)
private

Gets the entity and increments the expensive parser function count.

Parameters
Parser$parser
string$entityIdString
Returns
EntityId|null

◆ renderEscapedPlainText()

static Wikibase\Client\DataAccess\ParserFunctions\Runner::renderEscapedPlainText ( Parser  $parser,
PPFrame  $frame,
array  $args 
)
static
Parameters
Parser$parser
PPFrame$frame
array$args
Returns
array Wikitext in element 0, flags in named elements

◆ renderRichWikitext()

static Wikibase\Client\DataAccess\ParserFunctions\Runner::renderRichWikitext ( Parser  $parser,
PPFrame  $frame,
array  $args 
)
static
Parameters
Parser$parser
PPFrame$frame
array$args
Returns
array Wikitext in element 0, flags in named elements

◆ runPropertyParserFunction()

Wikibase\Client\DataAccess\ParserFunctions\Runner::runPropertyParserFunction ( Parser  $parser,
PPFrame  $frame,
array  $args,
  $type = DataAccessSnakFormatterFactory::TYPE_ESCAPED_PLAINTEXT 
)
Parameters
Parser$parser
PPFrame$frame
array$args
string$typeOne of DataAccessSnakFormatterFactory::TYPE_*
Returns
array Wikitext in element 0, flags in named elements

Member Data Documentation

◆ $allowArbitraryDataAccess

Wikibase\Client\DataAccess\ParserFunctions\Runner::$allowArbitraryDataAccess
private

◆ $entityIdParser

Wikibase\Client\DataAccess\ParserFunctions\Runner::$entityIdParser
private

◆ $rendererFactory

Wikibase\Client\DataAccess\ParserFunctions\Runner::$rendererFactory
private

◆ $restrictedEntityLookup

Wikibase\Client\DataAccess\ParserFunctions\Runner::$restrictedEntityLookup
private

◆ $siteId

Wikibase\Client\DataAccess\ParserFunctions\Runner::$siteId
private

◆ $siteLinkLookup

Wikibase\Client\DataAccess\ParserFunctions\Runner::$siteLinkLookup
private

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