Zend\EventManager\EventManagerAwareTrait
A trait for objects that provide events.
If you use this trait in an object, you will probably want to also implement
EventManagerAwareInterface, which will make it so the default initializer in
a ZF2 MVC application will automatically inject an instance of the
EventManager into your object when it is pulled from the ServiceManager.
Synopsis
trait EventManagerAwareTrait
{
- // members
- protected EventManagerInterface $events;
- // methods
- public mixed setEventManager()
- public EventManagerInterface getEventManager()
Members
protected
- $events — Zend\EventManager\EventManagerInterface
Methods
public
- getEventManager() — Retrieve the event manager
- setEventManager() — Set the event manager instance used by this context.