Fully Qualified Name: | Laminas\Code\Annotation\Parser\DoctrineAnnotationParser |
Implements: | ParserInterface |
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.
Name | Description | Defined By |
---|---|---|
__construct() | DoctrineAnnotationParser | |
getDocParser() | Retrieve the DocParser instance | DoctrineAnnotationParser |
onCreateAnnotation() | Handle annotation creation | DoctrineAnnotationParser |
registerAnnotation() | Specify an allowed annotation class | DoctrineAnnotationParser |
registerAnnotations() | Set many allowed annotations at once | DoctrineAnnotationParser |
setDocParser() | Set the DocParser instance | DoctrineAnnotationParser |
Returns: void
Retrieve the DocParser instance
If none is registered, lazy-loads a new instance.
Returns: \DocParser
Handle annotation creation
Parameter Name | Type | Description |
---|---|---|
$e | \EventInterface |
Returns: bool|\stdClass
Specify an allowed annotation class
Parameter Name | Type | Description |
---|---|---|
$annotation | string |
Returns: \DoctrineAnnotationParser
Set many allowed annotations at once
Parameter Name | Type | Description |
---|---|---|
$annotations | array|\Traversable | Array |
Returns: \DoctrineAnnotationParser
Set the DocParser instance
Parameter Name | Type | Description |
---|---|---|
$docParser | \DocParser |
Returns: \DoctrineAnnotationParser