Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\ParserOutput\DispatchingEntityViewFactory Class Reference

A factory to create EntityDocumentView implementations by entity type based on callbacks. More...

Public Member Functions

 __construct (array $entityViewFactoryCallbacks)
 
 newEntityView (Language $language, TermLanguageFallbackChain $termFallbackChain, EntityDocument $entity)
 Creates a new EntityDocumentView that can display the given type of entity.
 

Private Attributes

 $entityViewFactoryCallbacks
 

Detailed Description

A factory to create EntityDocumentView implementations by entity type based on callbacks.

Author
Bene* < benes.nosp@m.tar..nosp@m.wikim.nosp@m.edia.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\ParserOutput\DispatchingEntityViewFactory::__construct ( array $entityViewFactoryCallbacks)
Parameters
callable[]$entityViewFactoryCallbacks

Member Function Documentation

◆ newEntityView()

Wikibase\Repo\ParserOutput\DispatchingEntityViewFactory::newEntityView ( Language $language,
TermLanguageFallbackChain $termFallbackChain,
EntityDocument $entity )

Creates a new EntityDocumentView that can display the given type of entity.

Parameters
Language$language
TermLanguageFallbackChain$termFallbackChain
EntityDocument$entity
Exceptions
OutOfBoundsException
Returns
EntityDocumentView

Member Data Documentation

◆ $entityViewFactoryCallbacks

Wikibase\Repo\ParserOutput\DispatchingEntityViewFactory::$entityViewFactoryCallbacks
private

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