Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit acd4a7f

Browse files
committed
Document MergeReplaceKey/MergeRemoveKey features
Documents how the MergeReplaceKey and MergeRemoveKey features work, and that they require the developer to install zend-stdlib if they wish to use them.
1 parent b4f1f0c commit acd4a7f

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"athletic/athletic": "dev-master"
2525
},
2626
"suggest": {
27-
"ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services"
27+
"ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services",
28+
"zendframework/zend-stdlib": "zend-stdlib ^2.5 if you wish to use the MergeReplaceKey or MergeRemoveKey features in Config instances"
2829
},
2930
"minimum-stability": "dev",
3031
"prefer-stable": true,

src/Config.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@
1212
use Zend\Stdlib\ArrayUtils\MergeRemoveKey;
1313
use Zend\Stdlib\ArrayUtils\MergeReplaceKeyInterface;
1414

15+
/**
16+
* Object for defining configuration and configuring an existing service manager instance.
17+
*
18+
* In order to provide configuration merging capabilities, this class implements
19+
* the same functionality as `Zend\Stdlib\ArrayUtils::merge()`. That routine
20+
* allows developers to specifically shape how values are merged:
21+
*
22+
* - A value which is an instance of `MergeRemoveKey` indicates the value should
23+
* be removed during merge.
24+
* - A value that is an instance of `MergeReplaceKeyInterface` indicates that the
25+
* value it contains should be used to replace any previous versions.
26+
*
27+
* These features are advanced, and not typically used. If you wish to use them,
28+
* you will need to require the zend-stdlib package in your application.
29+
*/
1530
class Config implements ConfigInterface
1631
{
1732
/**

0 commit comments

Comments
 (0)