category Zend
package Zend_Mvc
subpackage Service


Create the service listener service

createService(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator) : \Zend\ModuleManager\Listener\ServiceListener

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



\Zend\Mvc\Exception\InvalidArgumentException For invalid configurations.




Default mvc-related service configuration -- can be overridden by modules.

$defaultServiceConfig : array