2017 © Pedro Peláez
 

library ze-config-manager

Zend Expressive Config Manager

image

gummmibear/ze-config-manager

Zend Expressive Config Manager

  • Tuesday, January 17, 2017
  • by gummmibear
  • Repository
  • 2 Watchers
  • 3 Stars
  • 2,966 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 23 % Grown

The README.md

Zend Expressive Config Manager

Build Status, (*1)

Library for config PHP application. With simple caching., (*2)

Designed for zend-expressive, (*3)

Installation

Composer

The preferred way to install this extension is through Composer., (*4)

Either run, (*5)

composer require gummmibear/ze-config-manager dev-master

or add, (*6)

"gummmibear/ze-config-manager": "dev-master"

to the require section of your composer.json, (*7)

Usage

Config providers

  • PHP
  • Yaml

File name patterns for php files. - *.global.php - *.local.php, (*8)

File name patterns for Yaml files - *.yml, - *.global.yml - *.local.yml, (*9)

To cache config file you can set cache dir otherwise will be used default value for cache file., (*10)


//config/config.php <?php require '../../vendor/autoload.php'; use Zend\Expressive\Config\ConfigManager; use Zend\Expressive\Config\ConfigFileProviderFactory; use Zend\Expressive\Config\ConfigFileProviderManager; $configFileProviderFactory = new ConfigFileProviderFactory(__DIR__ . '/autoload/'); $configFileProviderManager = new ConfigFileProviderManager($configFileProviderFactory); $routingFileProviderFactory = new ConfigFileProviderFactory(__DIR__ . '/routing/'); $routingFileProviderManager = new ConfigFileProviderManager($routingFileProviderFactory); $configManager = new ConfigManager(__DIR__); $configManager->setCacheFile('/cache/config_cache.php'); $configManager->registerProviders($configFileProviderManager->createDefaultProviders()); $configManager->registerProviders($routingFileProviderManager->createDefaultProviders()); $config = $configManager->getConfig(); return new ArrayObject($config, ArrayObject::ARRAY_AS_PROPS);

See Example/config.php., (*11)

The Versions

17/01 2017

dev-master

9999999-dev https://github.com/gummmibear/

Zend Expressive Config Manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dawid Jurga

php config zend yaml expressive

17/01 2017

v0.1

0.1.0.0 https://github.com/gummmibear/

Zend Expressive Config Manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dawid Jurga

php config zend yaml expressive

17/01 2017

v1.0

1.0.0.0 https://github.com/gummmibear/

Zend Expressive Config Manager

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dawid Jurga

php config zend yaml expressive