Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
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, $moduleName, EntityIdParser $entityIdParser, EntityIdFormatterFactory $entityIdFormatterFactory, ResultBuilder $resultBuilder, ApiErrorReporter $errorReporter, IBufferingStatsdDataFactory $dataFactory)
 
 execute ()
 

Protected Member Functions

 getAllowedParams ()
 
 getExamplesMessages ()
 

Private Member Functions

 getEntityIdsFromIdParam (array $params)
 

Static Private Member Functions

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

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,
  $moduleName,
EntityIdParser  $entityIdParser,
EntityIdFormatterFactory  $entityIdFormatterFactory,
ResultBuilder  $resultBuilder,
ApiErrorReporter  $errorReporter,
IBufferingStatsdDataFactory  $dataFactory 
)

Member Function Documentation

◆ execute()

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

◆ 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 (   $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: