qwant50/config

Jazz framework config component

3.0.1 2016-02-14 15:45 UTC

This package is not auto-updated.

Last update: 2024-11-09 20:39:20 UTC


README

ITCourses framework config component

Installation

The preferred way to install this ITCourses framework config component is through composer.

Either run

php composer.phar require "qwant50/config"

or add

"qwant50/config": "~3.*.*"

to the require section of your composer.json.

##Usage

####get all data (php | ini | yaml formats). Result file name to config file must be /path/to/config/development or /path/to/config/production

$config = new Config('/path/to/configs');
$allConfigs = $config->getData();

####get component's data

$config = new Config('/path/to/configs');
$data = $config->getData($fullFileName);
var_dump($config->getBasePath());
var_dump($data);

####save configuration data (support only '.php' file)

into a file with $key filename

$config->saveConfig($key);

or into a file with $fullFileName where $fullFileName it's a fileName + .php as extension

$config->saveConfig($key, $fullFileName);