Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Api\FormatEntities Class Reference

API module for formatting a set of entity IDs. More...

+ Inheritance diagram for Wikibase\Repo\Api\FormatEntities:
+ Collaboration diagram for Wikibase\Repo\Api\FormatEntities:

Public Member Functions

 __construct (ApiMain $mainModule, string $moduleName, EntityIdParser $entityIdParser, EntityIdFormatterFactory $entityIdFormatterFactory, ResultBuilder $resultBuilder, ApiErrorReporter $errorReporter, IBufferingStatsdDataFactory $dataFactory)
 
 execute ()
 

Static Public Member Functions

static factory (ApiMain $apiMain, string $moduleName, IBufferingStatsdDataFactory $dataFactory, ApiHelperFactory $apiHelperFactory, EntityIdFormatterFactory $entityIdFormatterFactory, EntityIdParser $entityIdParser)
 

Protected Member Functions

 getAllowedParams ()
 
 getExamplesMessages ()
 

Private Member Functions

 getEntityIdsFromIdParam (array $params)
 

Static Private Member Functions

static makeLinksAbsolute (string $html)
 Make the href="" attributes of <a> elements in an HTML snippet absolute. More...
 

Private Attributes

 $entityIdParser
 
 $entityIdFormatterFactory
 
 $resultBuilder
 
 $errorReporter
 
 $dataFactory
 

Detailed Description

API module for formatting a set of entity IDs.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Api\FormatEntities::__construct ( ApiMain  $mainModule,
string  $moduleName,
EntityIdParser  $entityIdParser,
EntityIdFormatterFactory  $entityIdFormatterFactory,
ResultBuilder  $resultBuilder,
ApiErrorReporter  $errorReporter,
IBufferingStatsdDataFactory  $dataFactory 
)

Member Function Documentation

◆ execute()

Wikibase\Repo\Api\FormatEntities::execute ( )

◆ factory()

static Wikibase\Repo\Api\FormatEntities::factory ( ApiMain  $apiMain,
string  $moduleName,
IBufferingStatsdDataFactory  $dataFactory,
ApiHelperFactory  $apiHelperFactory,
EntityIdFormatterFactory  $entityIdFormatterFactory,
EntityIdParser  $entityIdParser 
)
static

◆ getAllowedParams()

Wikibase\Repo\Api\FormatEntities::getAllowedParams ( )
protected

◆ getEntityIdsFromIdParam()

Wikibase\Repo\Api\FormatEntities::getEntityIdsFromIdParam ( array  $params)
private
Parameters
array$params
Returns
EntityId[]

◆ getExamplesMessages()

Wikibase\Repo\Api\FormatEntities::getExamplesMessages ( )
protected

◆ makeLinksAbsolute()

static Wikibase\Repo\Api\FormatEntities::makeLinksAbsolute ( string  $html)
staticprivate

Make the href="" attributes of <a> elements in an HTML snippet absolute.

URLs are expanded using wfExpandUrl.

Parameters
string$html
Returns
string

Member Data Documentation

◆ $dataFactory

Wikibase\Repo\Api\FormatEntities::$dataFactory
private

◆ $entityIdFormatterFactory

Wikibase\Repo\Api\FormatEntities::$entityIdFormatterFactory
private

◆ $entityIdParser

Wikibase\Repo\Api\FormatEntities::$entityIdParser
private

◆ $errorReporter

Wikibase\Repo\Api\FormatEntities::$errorReporter
private

◆ $resultBuilder

Wikibase\Repo\Api\FormatEntities::$resultBuilder
private

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