Name: zend-config-aggregator-parameters
Owner: Zend Framework
Description: PostProcessor extension for zendframework/zend-config-aggregator to allow usage of templated parameters within your configuration
Created: 2018-04-04 20:17:14.0
Updated: 2018-04-10 06:59:20.0
Pushed: 2018-05-22 16:23:32.0
Homepage: null
Size: 826
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Provides an extension to the zendframework/zend-config-aggregator
to allow parameters within your configuration.
Zend\ConfigAggregator\ArrayProvider;
Zend\ConfigAggregator\ConfigAggregator;
Zend\ConfigAggregatorParameters\ParameterPostProcessor;
regator = new ConfigAggregator(
[
new ArrayProvider([
'parameter_usage' => '%foo%',
'parameter_name' => '%%foo%%',
'recursive_parameter_usage' => '%bar.baz%',
]),
],
null,
[
new ParameterPostProcessor([
'foo' => 'bar',
'bar' => [
'baz' => 'qoo',
],
]),
]
dump($aggregator->getMergedConfig());
Result:
y(3) {
arameter_usage' =>
ring(3) "bar"
arameter_name' =>
ring(5) "%foo%"
ecursive_parameter_usage' =>
ring(3) "qoo"
arameters' =>
ray(3) {
'foo' =>
string(3) "bar"
'bar' =>
array(1) {
'baz' =>
string(3) "qoo"
}
'bar.baz' =>
string(3) "qoo"
For more details, please refer to the documentation.