Zend Framework  3.0
Public Member Functions | Public Attributes | Protected Attributes | List of all members
AnnotationManager Class Reference

Pluggable annotation manager. More...

Public Member Functions

 setEventManager (EventManagerInterface $events)
 Set the event manager instance.
 
 getEventManager ()
 Retrieve event manager.
 
 attach (ParserInterface $parser)
 Attach a parser to listen to the createAnnotation event.
 
 createAnnotation (array $annotationData)
 Create Annotation.
 

Public Attributes

const EVENT_CREATE_ANNOTATION = 'createAnnotation'
 

Protected Attributes

 $events
 

Detailed 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.

Member Function Documentation

attach ( ParserInterface  $parser)

Attach a parser to listen to the createAnnotation event.

Parameters
ParserInterface$parser
Returns
AnnotationManager
createAnnotation ( array  $annotationData)

Create Annotation.

Parameters
string[]$annotationData
Returns
false|
getEventManager ( )

Retrieve event manager.

Lazy loads an instance if none registered.

Returns
EventManagerInterface

Implements EventsCapableInterface.

setEventManager ( EventManagerInterface  $events)

Set the event manager instance.

Parameters
EventManagerInterface$events
Returns
AnnotationManager

Implements EventManagerAwareInterface.

Member Data Documentation

$events
protected
const EVENT_CREATE_ANNOTATION = 'createAnnotation'