This is a factory for classes which are identified by name.
All classes that this factory can supply need to be registered before (prototypes). This prototypes need to implement an interface which ensures every prototype has a name.
If the factory can not supply the class someone is asking for it tries to fallback on a generic default prototype, which would have need to be set before.
__construct(\Zend\Code\Generic\Prototype\PrototypeInterface[] $prototypes, \Zend\Code\Generic\Prototype\PrototypeGenericInterface $genericPrototype)
\Zend\Code\Generic\Prototype\PrototypeGenericInterface
addPrototype(\Zend\Code\Generic\Prototype\PrototypeInterface $prototype)
getClonedPrototype(string $prototypeName) : \Zend\Code\Generic\Prototype\PrototypeInterface
string
\Zend\Code\Reflection\Exception\RuntimeException |
---|
hasPrototype(string $name) : bool
string
bool
setGenericPrototype(\Zend\Code\Generic\Prototype\PrototypeGenericInterface $prototype)
normalizeName(string $name) : string
string
string
$prototypes : array