Methods

__construct()

__construct(\Zend\ServiceManager\ServiceManager $serviceManager, null | array $configuration) 

Parameters

$configuration

nullarray

addServiceManager()

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

Parameters

$serviceManager

\Zend\ServiceManager\ServiceManagerstring

Service Manager instance or name

$key

string

Configuration key

$moduleInterface

string

FQCN as string

$method

string

Method name

Exceptions

\Zend\ModuleManager\Listener\Exception\RuntimeException

Returns

attach()

attach(\Zend\EventManager\EventManagerInterface $events) : \Zend\ModuleManager\Listener\ServiceListener

detach()

detach(\Zend\EventManager\EventManagerInterface $events) : void

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

onLoadModule(\Zend\ModuleManager\ModuleEvent $e) : void

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

Use merged configuration to configure service manager

onLoadModulesPost(\Zend\ModuleManager\ModuleEvent $e) : void

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

Exceptions

\Zend\ModuleManager\Listener\Exception\RuntimeException

setDefaultServiceConfig()

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

Parameters

$configuration

array

Returns

Merge a service configuration container

serviceConfigToArray(\Zend\ServiceManager\Config | string $config) : array

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

Parameters

$config

\Zend\ServiceManager\Configstring

Instance of ServiceConfig or class name

Exceptions

\Zend\ModuleManager\Listener\Exception\RuntimeException

Returns

array

 Properties

 

$defaultServiceConfig

$defaultServiceConfig : array

 

Default service manager used to fulfill other SMs that need to be lazy loaded

$defaultServiceManager : \Zend\ServiceManager\ServiceManager

 

$listeners

$listeners : \Zend\Stdlib\CallbackHandler[]

 

$serviceManagers

$serviceManagers : array