Config
in package
implements
ConfigInterface
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\Stdlib\ArrayUtils::merge()
. That routine
allows developers to specifically shape how values are merged:
- A value which is an instance of
MergeRemoveKey
indicates the value should be removed during merge. - A value that is an instance of
MergeReplaceKeyInterface
indicates that the value it contains should be used to replace any previous versions.
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.
Interfaces, Classes, Traits and Enums
Table of Contents
- $config : array<string|int, mixed>
- $allowedKeys : array<string|int, mixed>
- __construct() : mixed
- configureServiceManager() : ServiceManager
- Configure a service manager.
- toArray() : array<string|int, mixed>
- Return configuration for a service manager instance as an array.
- merge() : mixed
- Copy paste from https://github.com/zendframework/zend-stdlib/commit/26fcc32a358aa08de35625736095cb2fdaced090 to keep compatibility with previous version
Properties
$config
protected
array<string|int, mixed>
$config
= ['abstract_factories' => [], 'aliases' => [], 'delegators' => [], 'factories' => [], 'initializers' => [], 'invokables' => [], 'lazy_services' => [], 'services' => [], 'shared' => []]
$allowedKeys
private
array<string|int, mixed>
$allowedKeys
= ['abstract_factories' => true, 'aliases' => true, 'delegators' => true, 'factories' => true, 'initializers' => true, 'invokables' => true, 'lazy_services' => true, 'services' => true, 'shared' => true]
Methods
__construct()
public
__construct([array<string|int, mixed> $config = [] ]) : mixed
Parameters
- $config : array<string|int, mixed> = []
Return values
mixed —configureServiceManager()
Configure a service manager.
public
configureServiceManager(ServiceManager $serviceManager) : ServiceManager
Parameters
- $serviceManager : ServiceManager
Tags
Return values
ServiceManager —toArray()
Return configuration for a service manager instance as an array.
public
toArray() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —merge()
Copy paste from https://github.com/zendframework/zend-stdlib/commit/26fcc32a358aa08de35625736095cb2fdaced090 to keep compatibility with previous version
private
merge(array<string|int, mixed> $a, array<string|int, mixed> $b) : mixed
Parameters
- $a : array<string|int, mixed>
- $b : array<string|int, mixed>