Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\EntityFactory Class Reference

Factory for new, empty Entity objects. More...

Public Member Functions

 __construct (array $instantiators)
 
 newEmpty ( $entityType)
 

Private Attributes

 $instantiators
 

Detailed Description

Factory for new, empty Entity objects.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\EntityFactory::__construct ( array  $instantiators)
Parameters
callable[]$instantiatorsArray mapping entity type identifiers to callbacks returning a new, empty entity of that type.

Member Function Documentation

◆ newEmpty()

Wikibase\Lib\EntityFactory::newEmpty (   $entityType)
Parameters
string$entityType
Exceptions
OutOfBoundsException
Returns
EntityDocument

Member Data Documentation

◆ $instantiators

Wikibase\Lib\EntityFactory::$instantiators
private

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