Tries to get a service named ServiceListenerInterface from the service
locator, otherwise creates a Zend\ModuleManager\Listener\ServiceListener
service, passing it the service locator instance and the default service
configuration, which can be overridden by modules.
It looks for the 'service_listener_options' key in the application
config and tries to add service manager as configured. The value of
'service_listener_options' must be a list (array) which contains the
following keys:
- service_manager: the name of the service manage to create as string
- config_key: the name of the configuration key to search for as string
- interface: the name of the interface that modules can implement as string
- method: the name of the method that modules have to implement as string
inherited_from |
\Zend\Mvc\Service\ServiceListenerFactory::createService() |
Parameters
Exceptions
Returns