Interface for self-registering event listeners.

Classes implementing this interface may be registered by name or instance with an EventManager, without an event name. The \Zend\ModuleManager\Listener\attach() method will then be called with the current EventManager instance, allowing the class to wire up one or more listeners.

package Default
inherited_from \Zend\EventManager\ListenerAggregateInterface

 Methods

addServiceManager()

addServiceManager(\Zend\ServiceManager\ServiceManager|string $serviceManager, string $key, string $moduleInterface, string $method) : \Zend\ModuleManager\Listener\ServiceListenerInterface

Parameters

$serviceManager

\Zend\ServiceManager\ServiceManagerstring

Service Manager instance or name

$key

string

Configuration key

$moduleInterface

string

FQCN as string

$method

string

Method name

Returns

\Zend\ModuleManager\Listener\ServiceListenerInterface

setDefaultServiceConfig()

setDefaultServiceConfig(array $configuration) : \Zend\ModuleManager\Listener\ServiceListenerInterface

Parameters

$configuration

array

Returns

\Zend\ModuleManager\Listener\ServiceListenerInterface