Class ServiceListener

Summary

Fully Qualified Name: Zend\ModuleManager\Listener\ServiceListener
Implements: ServiceListenerInterface

Description

Methods

Name Description Defined By
__construct() ServiceListener
addServiceManager() ServiceListener
attach() ServiceListener
detach() ServiceListener
onLoadModule() Retrieve service manager configuration from module, and configure the service manager. ServiceListener
onLoadModulesPost() Use merged configuration to configure service manager ServiceListener
setDefaultServiceConfig() ServiceListener

Method Details

__construct()

Parameter Name Type Description
$serviceManager \ServiceManager
$configuration null|array

Returns:

addServiceManager()

Parameter Name Type Description
$serviceManager
$key
$moduleInterface
$method

Returns:

attach()

Parameter Name Type Description
$events \EventManagerInterface
$priority int

Returns: \ServiceListener

detach()

Parameter Name Type Description
$events \EventManagerInterface

Returns: void

onLoadModule()

Retrieve service manager configuration from module, and configure the service manager.

If the module does not implement a specific interface and does not implement a specific method, does nothing. Also, if the return value of that method is not a ServiceConfig object, or not an array or Traversable that can seed one, does nothing.

The interface and method name can be set by adding a new service manager via the addServiceManager() method.

Parameter Name Type Description
$e \ModuleEvent

Returns: void

onLoadModulesPost()

Use merged configuration to configure service manager

If the merged configuration has a non-empty, array 'service_manager' key, it will be passed to a ServiceManager Config object, and used to configure the service manager.

Parameter Name Type Description
$e \ModuleEvent

Returns: void

setDefaultServiceConfig()

Parameter Name Type Description
$configuration array

Returns: \ServiceListener

Top