Zend Framework  3.0
Public Member Functions | List of all members
AbstractAnnotationsListener Class Reference

Base annotations listener. More...

Public Member Functions

 handleNameAnnotation ($e)
 Attempt to discover a name set via annotation.
 
 discoverFallbackName ($e)
 Discover the fallback name via reflection.
 
- Public Member Functions inherited from AbstractListenerAggregate
 detach (EventManagerInterface $events)
 Detach all previously attached listeners.
Parameters
EventManagerInterface$events
Returns
void

 
- Public Member Functions inherited from ListenerAggregateInterface
 attach (EventManagerInterface $events, $priority=1)
 Attach one or more listeners.
 

Additional Inherited Members

- Protected Attributes inherited from AbstractListenerAggregate
 $listeners = []
 

Detailed Description

Base annotations listener.

Provides an implementation of detach() that should work with any listener. Also provides listeners for the "Name" annotation – handleNameAnnotation() will listen for the "Name" annotation, while discoverFallbackName() listens on the "discoverName" event and will use the class or property name, as discovered via reflection, if no other annotation has provided the name already.

Member Function Documentation

discoverFallbackName (   $e)

Discover the fallback name via reflection.

Parameters
\Zend\EventManager\EventInterface$e
Returns
string
handleNameAnnotation (   $e)

Attempt to discover a name set via annotation.

Parameters
\Zend\EventManager\EventInterface$e
Returns
false|string