2017 © Pedro Peláez
 

library zend-config-aggregator

Lightweight library for collecting and merging configuration from different sources

image

zendframework/zend-config-aggregator

Lightweight library for collecting and merging configuration from different sources

  • Wednesday, April 4, 2018
  • by zendframework
  • Repository
  • 22 Watchers
  • 36 Stars
  • 211,592 Installations
  • PHP
  • 69 Dependents
  • 1 Suggesters
  • 9 Forks
  • 1 Open issues
  • 9 Versions
  • 23 % Grown

The README.md

zend-config-aggregator

Repository abandoned 2019-12-31

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

Build Status Coverage Status, (*2)

Aggregates and merges configuration, from a variety of formats. Supports caching for fast bootstrap in production environments., (*3)

Usage

The standalone ConfigAggregator can be used to merge PHP-based configuration files:, (*4)

use Zend\ConfigAggregator\ConfigAggregator;
use Zend\ConfigAggregator\PhpFileProvider;

$aggregator = new ConfigAggregator([
    new PhpFileProvider('*.global.php'),
]);

var_dump($aggregator->getMergedConfig());

Using this provider, each file should return a PHP array:, (*5)

// db.global.php
return [
    'db' => [
        'dsn' => 'mysql:...',
    ],    
];

// cache.global.php
return [
    'cache_storage' => 'redis',
    'redis' => [ ... ],
];

Result:, (*6)

array(3) {
  'db' =>
  array(1) {
    'dsn' =>
    string(9) "mysql:..."
  }
  'cache_storage' =>
  string(5) "redis"
  'redis' =>
  array(0) {
     ...
  }
}

Configuration is merged in the same order as it is passed, with later entries having precedence., (*7)

Together with zend-config, zend-config-aggregator can be also used to load configuration in different formats, including YAML, JSON, XML, or INI:, (*8)

use Zend\ConfigAggregator\ConfigAggregator;
use Zend\ConfigAggregator\ZendConfigProvider;

$aggregator = new ConfigAggregator([
    new ZendConfigProvider('config/*.{json,yaml,php}'),
]);

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


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

The Versions

04/04 2018

dev-develop

dev-develop

Lightweight library for collecting and merging configuration from different sources

  Sources   Download

BSD-3-Clause BSD 3-Clause

The Requires

 

The Development Requires

zendframework zf config-aggregator

04/04 2018

dev-master

9999999-dev

Lightweight library for collecting and merging configuration from different sources

  Sources   Download

BSD-3-Clause BSD 3-Clause

The Requires

 

The Development Requires

zendframework zf config-aggregator

04/04 2018

1.1.1

1.1.1.0

Lightweight library for collecting and merging configuration from different sources

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

zendframework zf config-aggregator

26/02 2018

1.1.0

1.1.0.0

Lightweight library for collecting and merging configuration from different sources

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

zendframework zf config-aggregator

06/11 2017
24/04 2017

1.0.0

1.0.0.0

Lightweight library for merging and caching application config

  Sources   Download

BSD 3-Clause

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

23/04 2017

0.2.1

0.2.1.0

Lightweight library for merging and caching application config

  Sources   Download

BSD 3-Clause

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

11/01 2017

0.2.0

0.2.0.0

Lightweight library for merging and caching application config

  Sources   Download

BSD 3-Clause

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

08/12 2016

0.1.0

0.1.0.0

Lightweight library for merging and caching application config

  Sources   Download

BSD 3-Clause

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires