dev-master
9999999-dev https://github.com/codzo/ConfigConfiguration handler
Apache License
The Requires
- php >=5.3.0
The Development Requires
by Neil Fan
config setting
Wallogit.com
2017 © Pedro Peláez
Configuration handler
Configuration handler., (*1)
This package will read configuration files from a directory and allow retrieval of data in several ways., (*2)
composer require codzo/config
$config = new \Codzo\Config\Config('./config');
// retrieve the config
$app = $config->get('app');
$enabled = $app['ini']['enabled'];
// or quickly
$enabled = $config->get('app.ini.enabled');
This package requires a directory as home to all configuration files. Files in this directory will be considered as configuration files if filetype supported., (*3)
This package will not load any file in sub-directory., (*4)
These file types are supported: + php + ini + xml, (*5)
PHP configuration files shall return an array., (*6)
INI files will be parsed using parse_ini_file() method., (*7)
XML files will be parsed using simplexml_load_file() method., (*8)
The configuration loaded from all files will then be merged together. Duplicated items will be overwritten without any warning., (*9)
Configurations can be retrieved in several ways. + as an array: Use keys to navigate in multiplication arrays + quick search: Concat the keys into a path and get the configuration quickly., (*10)
Configuration handler
Apache License
config setting