Zend Framework  3.0
Public Member Functions | Protected Attributes | List of all members
Config Class Reference

Object for defining configuration and configuring an existing service manager instance. More...

Public Member Functions

 __construct (array $config=[])
 
 configureServiceManager (ServiceManager $serviceManager)
 Configure a service manager.Implementations should pull configuration from somewhere (typically local properties) and pass it to a ServiceManager's withConfig() method, returning a new instance.
Parameters
ServiceManager$serviceManager
Returns
ServiceManager

 
 toArray ()
 Return configuration for a service manager instance as an array.Implementations MUST return an array compatible with ServiceManager::configure, containing one or more of the following keys:
  • abstract_factories
  • aliases
  • delegators
  • factories
  • initializers
  • invokables
  • lazy_services
  • services
  • shared
In other words, this should return configuration that can be used to instantiate a service manager or plugin manager, or pass to its `withConfig()` method.
Returns
array

 

Protected Attributes

 $config
 

Detailed Description

Object for defining configuration and configuring an existing service manager instance.

In order to provide configuration merging capabilities, this class implements the same functionality as `Zend::merge()`. That routine allows developers to specifically shape how values are merged:

These features are advanced, and not typically used. If you wish to use them, you will need to require the zend-stdlib package in your application.

Constructor & Destructor Documentation

__construct ( array  $config = [])
Parameters
array$config

Member Function Documentation

configureServiceManager ( ServiceManager  $serviceManager)

Configure a service manager.Implementations should pull configuration from somewhere (typically local properties) and pass it to a ServiceManager's withConfig() method, returning a new instance.

Parameters
ServiceManager$serviceManager
Returns
ServiceManager

Implements ConfigInterface.

toArray ( )

Return configuration for a service manager instance as an array.Implementations MUST return an array compatible with ServiceManager::configure, containing one or more of the following keys:

  • abstract_factories
  • aliases
  • delegators
  • factories
  • initializers
  • invokables
  • lazy_services
  • services
  • shared
In other words, this should return configuration that can be used to instantiate a service manager or plugin manager, or pass to its `withConfig()` method.
Returns
array

Return an associative array of the stored data.

Returns
array

Implements ConfigInterface.

Member Data Documentation

$config
protected
Initial value:
= [
'abstract_factories' => []