Class AnnotationManager

Summary

Fully Qualified Name: Zend\Code\Annotation\AnnotationManager
Implements: EventManagerAwareInterface

Description

Pluggable annotation manager

Simply composes an EventManager. When createAnnotation() is called, it fires off an event of the same name, passing it the resolved annotation class, the annotation content, and the raw annotation string; the first listener to return an object will halt execution of the event, and that object will be returned as the annotation.

Methods

Name Description Defined By
attach() Attach a parser to listen to the createAnnotation event AnnotationManager
createAnnotation() Create Annotation AnnotationManager
getEventManager() Retrieve event manager AnnotationManager
setEventManager() Set the event manager instance AnnotationManager

Method Details

attach()

Attach a parser to listen to the createAnnotation event

Parameter Name Type Description
$parser \ParserInterface

Returns: \AnnotationManager

createAnnotation()

Create Annotation

Parameter Name Type Description
$annotationData string[]

Returns: bool|\stdClass

getEventManager()

Retrieve event manager

Lazy loads an instance if none registered.

Returns: \EventManagerInterface

setEventManager()

Set the event manager instance

Parameter Name Type Description
$events \EventManagerInterface

Returns: \AnnotationManager

Top