Class DoctrineAnnotationParser

Summary

Fully Qualified Name: Zend\Code\Annotation\Parser\DoctrineAnnotationParser
Implements: ParserInterface

Description

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

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

Method Details

__construct()

Returns: void

getDocParser()

Retrieve the DocParser instance

If none is registered, lazy-loads a new instance.

Returns: \DocParser

onCreateAnnotation()

Handle annotation creation

Parameter Name Type Description
$e \EventInterface

Returns: bool|\stdClass

registerAnnotation()

Specify an allowed annotation class

Parameter Name Type Description
$annotation string

Returns: \DoctrineAnnotationParser

registerAnnotations()

Set many allowed annotations at once

Parameter Name Type Description
$annotations array|\Traversable Array

Returns: \DoctrineAnnotationParser

setDocParser()

Set the DocParser instance

Parameter Name Type Description
$docParser \DocParser

Returns: \DoctrineAnnotationParser

Top