2017 © Pedro Peláez
 

library config

Extensible configuration manager for PHP projects that uses dot notation and supports json, ini, array based and many more common formats

image

unity/config

Extensible configuration manager for PHP projects that uses dot notation and supports json, ini, array based and many more common formats

  • Saturday, November 4, 2017
  • by e200
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Unity/Config

An extensible configuration manager for PHP projects., (*1)

Get started managing your configurations., (*2)

Features

  • Array access
  • Dot notation access
  • Configurations cache
  • Auto driver detection
  • Runtime modification

Supported drivers

Installation

composer require unity/config

Usage

You have the follow configuration file: configs/db.php in your project folder containing the bellow configurations:, (*3)

<?php

return [
    'user' => 'root',
    'psw'  => 'toor',
    'db'   => 'example',
    'host' => 'localhost'
];

and you want to manage these configurations, thats what you need to do:, (*4)

<?php

require "vendor/autoload.php";

$config = (new ConfigManager())
            ->setSource('configs')
            ->build();

Now, to access a configuration you can use the $config->get(), e.g.:, (*5)

echo $config->get('db.user');

Or in a more simple way, using array access:, (*6)

echo $config['db']['user'];

Both methods will have the same output:, (*7)

root

Ask your self, is it easy???, (*8)

Contributing

We will be really thankful if you make a fork, make your changes and send a pull request!, (*9)

Credits

License

The Unity/Config is licensed under the MIT license. See license file for more information., (*10)

The Versions

04/11 2017

dev-master

9999999-dev https://github.com/unity-framework/Config

Extensible configuration manager for PHP projects that uses dot notation and supports json, ini, array based and many more common formats

  Sources   Download

MIT

The Requires

 

The Development Requires

php configuration config extensible unity unity-framework

04/11 2017

dev-analysis-q125dj

dev-analysis-q125dj https://github.com/unity-framework/Config

Extensible configuration manager for PHP projects that uses dot notation and supports json, ini, array based and many more common formats

  Sources   Download

MIT

The Requires

 

The Development Requires

php configuration config extensible unity unity-framework

16/09 2017

dev-revert-4-analysis-8jyWyB

dev-revert-4-analysis-8jyWyB https://github.com/unity-framework/Config

Extensible configuration manager for PHP projects that uses dot notation and supports json, ini, array based and many more common formats

  Sources   Download

MIT

The Requires

 

The Development Requires

php configuration config extensible unity unity-framework

16/09 2017

dev-analysis-8Qd2jP

dev-analysis-8Qd2jP https://github.com/unity-framework/Config

Extensible configuration manager for PHP projects that uses dot notation and supports json, ini, array based and many more common formats

  Sources   Download

MIT

The Requires

 

The Development Requires

php configuration config extensible unity unity-framework

16/09 2017

dev-analysis-zDxYly

dev-analysis-zDxYly https://github.com/unity-framework/Config

Extensible configuration manager for PHP projects that uses dot notation and supports json, ini, array based and many more common formats

  Sources   Download

MIT

The Requires

 

The Development Requires

php configuration config extensible unity unity-framework

13/08 2017

dev-refactoring

dev-refactoring https://github.com/unity-framework/Configuration

Extensible configuration manager for PHP projects that uses dot notation and supports json, ini, array based and many more common formats

  Sources   Download

MIT

The Development Requires

php configuration config extensible unity unity-framework

08/08 2017

v0.1

0.1.0.0 https://github.com/unity-framework/Configuration

Extensible configuration manager for PHP projects that uses dot notation and supports json, ini, array based and many more common formats

  Sources   Download

MIT

The Development Requires

php configuration config extensible unity unity-framework