2017 © Pedro PelĂĄez
 

library zend-config-aggregator-parameters

PostProcessor extension for zendframework/zend-config-aggregator to allow usage of templated parameters within your configuration

image

zendframework/zend-config-aggregator-parameters

PostProcessor extension for zendframework/zend-config-aggregator to allow usage of templated parameters within your configuration

  • Wednesday, April 4, 2018
  • by zendframework
  • Repository
  • 14 Watchers
  • 2 Stars
  • 347 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 608 % Grown

The README.md

zend-config-aggregator-parameters

Repository abandoned 2019-12-31

This repository has moved to laminas/laminas-config-aggregator-parameters., (*1)

Build Status Coverage Status, (*2)

Provides an extension to the zendframework/zend-config-aggregator to allow parameters within your configuration., (*3)

Usage

use Zend\ConfigAggregator\ArrayProvider;
use Zend\ConfigAggregator\ConfigAggregator;
use Zend\ConfigAggregatorParameters\ParameterPostProcessor;

$aggregator = new ConfigAggregator(
    [
        new ArrayProvider([
            'parameter_usage' => '%foo%',
            'parameter_name' => '%%foo%%',
            'recursive_parameter_usage' => '%bar.baz%',
            'parameterized_parameter_usage' => '%bar.quux%',
        ]),
    ],
    null,
    [
        new ParameterPostProcessor([
            'foo' => 'bar',
            'bar' => [
                'baz' => 'qoo',
                'quux' => '%foo%', 
            ],
        ]),
    ]
);

var_dump($aggregator->getMergedConfig());

Result:, (*4)

array(5) {
  'parameter_usage' =>
  string(3) "bar"
  'parameter_name' =>
  string(5) "%foo%"
  'recursive_parameter_usage' =>
  string(3) "qoo"
  'parameterized_parameter_usage' =>
  string(3) "bar"
  'parameters' =>
  array(4) {
    'foo' =>
    string(3) "bar"
    'bar' =>
    array(2) {
      'baz' =>
      string(3) "qoo"
      'quux' =>
      string(3) "bar"
    }
    'bar.baz' =>
    string(3) "qoo"
    'bar.quux' =>
    string(3) "bar"
  }
}

For more details, please refer to the documentation., (*5)


  • File issues at https://github.com/zendframework/zend-config-aggregator-parameters/issues
  • Documentation is at https://docs.zendframework.com/zend-config-aggregator-parameters/

The Versions

04/04 2018

dev-develop

dev-develop

PostProcessor extension for zendframework/zend-config-aggregator to allow usage of templated parameters within your configuration

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Maximilian Bösing

04/04 2018

dev-master

9999999-dev

PostProcessor extension for zendframework/zend-config-aggregator to allow usage of templated parameters within your configuration

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Maximilian Bösing

04/04 2018

1.0.0

1.0.0.0

PostProcessor extension for zendframework/zend-config-aggregator to allow usage of templated parameters within your configuration

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Maximilian Bösing