Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory Class Reference

Public Member Functions

 __construct (Language $language, EntityTitleTextLookup $entityTitleTextLookup, array $callbacks)
 
 getLinkFormatter ( $type)
 
 getDefaultLinkFormatter ()
 

Private Member Functions

 getOrCreateLinkFormatter ( $type)
 
 createAndCacheLinkFormatter ( $type)
 

Private Attributes

 $callbacks
 
 $cachedLinkFormatters = []
 
 $language
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::__construct ( Language  $language,
EntityTitleTextLookup  $entityTitleTextLookup,
array  $callbacks 
)
Parameters
Language$language
callable[]$callbacksmaps entity type strings to callbacks returning LinkFormatter

Member Function Documentation

◆ createAndCacheLinkFormatter()

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::createAndCacheLinkFormatter (   $type)
private
Parameters
string$type
Returns
EntityLinkFormatter

◆ getDefaultLinkFormatter()

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::getDefaultLinkFormatter ( )

◆ getLinkFormatter()

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::getLinkFormatter (   $type)
Parameters
string$typeentity type
Returns
EntityLinkFormatter

◆ getOrCreateLinkFormatter()

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::getOrCreateLinkFormatter (   $type)
private
Parameters
string$type
Returns
EntityLinkFormatter

Member Data Documentation

◆ $cachedLinkFormatters

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::$cachedLinkFormatters = []
private

◆ $callbacks

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::$callbacks
private

◆ $language

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::$language
private

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