Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
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.
 
 getEntityIdFormatter (Language $language)
 

Detailed Description

A factory interface for generating EntityIdFormatters.

Author
Daniel Kinzler

Member Function Documentation

◆ getEntityIdFormatter()

Wikibase\View\EntityIdFormatterFactory::getEntityIdFormatter ( Language $language)

◆ 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, Wikibase\Repo\EntityIdLabelFormatterFactory, and Wikibase\Repo\FederatedProperties\WrappingEntityIdFormatterFactory.


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