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.

 Methods

Attach one or more listeners

attach(\Zend\EventManager\EventManagerInterface $events) : void
Inherited

Implementors may add an optional $priority argument; the EventManager implementation will pass this to the aggregate.

inherited_from \Zend\EventManager\ListenerAggregateInterface::attach()
inherited_from \Zend\EventManager\AbstractListenerAggregate::attach()

Parameters

Detach all previously attached listeners

detach(\Zend\EventManager\EventManagerInterface $events) : void
Inherited

inherited_from \Zend\EventManager\AbstractListenerAggregate::detach()

Parameters

Discover the fallback name via reflection

discoverFallbackName(\Zend\EventManager\EventInterface $e) : string

Parameters

Returns

string

Attempt to discover a name set via annotation

handleNameAnnotation(\Zend\EventManager\EventInterface $e) : false | string

Parameters

Returns

falsestring

 Properties

 

$listeners

$listeners : \Zend\Stdlib\CallbackHandler[]
Inherited

inherited_from \Zend\EventManager\AbstractListenerAggregate::$$listeners