1105. Class

1105.1. Zend\ModuleManager\Listener\ServiceListener

1105.1.1. Methods

1105.1.1.1. __construct

__construct()

@param ServiceManager $serviceManager

Parameters:null|array

1105.1.1.2. setDefaultServiceConfig

setDefaultServiceConfig()

@param array $configuration

Return type:ServiceListener

1105.1.1.3. addServiceManager

addServiceManager()

@param ServiceManager|string $serviceManager Service Manager instance or name

Parameters:
  • string – Configuration key
  • string – FQCN as string
  • string – Method name
Throws ExceptionRuntimeException:
 
Return type:

ServiceListener

1105.1.1.4. attach

attach()

@param EventManagerInterface $events

Return type:ServiceListener

1105.1.1.5. detach

detach()

@param EventManagerInterface $events

Return type:void

1105.1.1.6. onLoadModule

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.

Parameters:ModuleEvent
Return type:void

1105.1.1.7. onLoadModulesPost

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.

Parameters:ModuleEvent
Throws ExceptionRuntimeException:
 
Return type:void

1105.1.1.8. serviceConfigToArray

serviceConfigToArray()

Merge a service configuration container

Extracts the various service configuration arrays, and then merges with the internal service configuration.

Parameters:ServiceConfig|string – Instance of ServiceConfig or class name
Throws ExceptionRuntimeException:
 
Return type:array