hasAnnotation()
onCreateAnnotation()
registerAnnotation()
registerAnnotations()
setAlias()
hasAlias()
normalizeAlias()
resolveAlias()
$aliases
$annotationNames
$annotations
Generic annotation parser
Expects registration of AnnotationInterface instances. Such instances will be passed annotation content to their initialize() method, which they are then responsible for parsing.
hasAnnotation(string $class) : bool
string
boolonCreateAnnotation(\Zend\EventManager\EventInterface $e) : false | \Zend\Code\Annotation\AnnotationInterface
If the annotation class or alias is not registered, immediately returns false. Otherwise, resolves the class, clones it, and, if any content is present, calls AnnotationInterface::initialize() with the content.
registerAnnotation(string | \Zend\Code\Annotation\AnnotationInterface $annotation) : \Zend\Code\Annotation\Parser\GenericAnnotationParser
string\Zend\Code\Annotation\AnnotationInterfaceString class name of an AnnotationInterface implementation, or actual instance
\Zend\Code\Exception\InvalidArgumentException |
|---|
registerAnnotations(array | \Traversable $annotations) : \Zend\Code\Annotation\Parser\GenericAnnotationParser
array\Traversable
\Zend\Code\Exception\InvalidArgumentException |
|---|
setAlias(string $alias, string $class) : \Zend\Code\Annotation\Parser\GenericAnnotationParser
string
stringMay be either a registered annotation name or another alias
\Zend\Code\Exception\InvalidArgumentException |
|---|
hasAlias(string $alias) : bool
string
boolnormalizeAlias(string $alias) : string
string
stringresolveAlias(string $alias) : string
string
string$aliases : array
$annotationNames : array