Wikibase
MediaWiki Wikibase extension
Wikibase\View\EntityIdFormatterFactory Interface Reference

A factory interface for generating EntityIdFormatters. More...

+ Inheritance diagram for Wikibase\View\EntityIdFormatterFactory:

Public Member Functions

 getOutputFormat ()
 Returns the formatter's output format, as defined by the SnakFormatter::FORMAT_XXX constants. More...
 
 getEntityIdFormatter (Language $language)
 

Detailed Description

A factory interface for generating EntityIdFormatters.

Author
Daniel Kinzler

Member Function Documentation

◆ getEntityIdFormatter()

Wikibase\View\EntityIdFormatterFactory::getEntityIdFormatter ( Language  $language)
Parameters
Language$language
Returns
EntityIdFormatter

Implemented in Wikibase\Repo\EntityIdHtmlLinkFormatterFactory, and Wikibase\Repo\EntityIdLabelFormatterFactory.

◆ getOutputFormat()

Wikibase\View\EntityIdFormatterFactory::getOutputFormat ( )

Returns the formatter's output format, as defined by the SnakFormatter::FORMAT_XXX constants.

This allows callers to assert that the formatter returned by getEntityIdFormatter() will generate text in the desired format, applying the appropriate escaping.

See also
SnakFormatter::FORMAT_WIKITEXT
SnakFormatter::FORMAT_HTML
Returns
string

Implemented in Wikibase\Repo\EntityIdHtmlLinkFormatterFactory, and Wikibase\Repo\EntityIdLabelFormatterFactory.


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