A parser for docblock annotations that utilizes the annotation parser from
Doctrine\Common.
Consumes Doctrine\Common\Annotations\DocParser, and responds to events from
AnnotationManager. If the annotation examined is in the list of classes we
are interested in, the raw annotation is passed to the DocParser in order to
retrieve the annotation object instance. Otherwise, it is skipped.
Methods
__construct()
__construct()
Retrieve the DocParser instance
getDocParser() : \Doctrine\Common\Annotations\DocParser
If none is registered, lazy-loads a new instance.
Returns
\Doctrine\Common\Annotations\DocParser
Handle annotation creation
onCreateAnnotation(\Zend\EventManager\EventInterface $e) : false | \stdClass
inherited_from |
\Zend\Code\Annotation\Parser\ParserInterface::onCreateAnnotation() |
Parameters
$e
\Zend\EventManager\EventInterface
Returns
false
\stdClass
Specify an allowed annotation class
registerAnnotation(string $annotation) : \Zend\Code\Annotation\Parser\DoctrineAnnotationParser
inherited_from |
\Zend\Code\Annotation\Parser\ParserInterface::registerAnnotation() |
Parameters
$annotation
string
Returns
\Zend\Code\Annotation\Parser\DoctrineAnnotationParser
Set many allowed annotations at once
registerAnnotations(array|\Traversable $annotations) : \Zend\Code\Annotation\Parser\DoctrineAnnotationParser
inherited_from |
\Zend\Code\Annotation\Parser\ParserInterface::registerAnnotations() |
Parameters
$annotations
array
\Traversable
Array or traversable object of
annotation class names
Exceptions
\Zend\Code\Exception\InvalidArgumentException |
|
Returns
\Zend\Code\Annotation\Parser\DoctrineAnnotationParser
Set the DocParser instance
setDocParser(\Doctrine\Common\Annotations\DocParser $docParser) : \Zend\Code\Annotation\Parser\DoctrineAnnotationParser
Parameters
$docParser
\Doctrine\Common\Annotations\DocParser
Returns
\Zend\Code\Annotation\Parser\DoctrineAnnotationParser
Properties
Annotation classes we support on this iteration
$allowedAnnotations : array
$docParser
$docParser : \Doctrine\Common\Annotations\DocParser