Via Composer
$ composer require mediadevs/configurationVia GIT
HTTPS:
git clone https://github.com/mediadevs/configuration.git
SSH:
git clone git@github.com:mediadevs/configuration.git<?php
use Mediadevs\Configuration\Configuration;
use \Mediadevs\Configuration\Exceptions\ConfigurationFileException;
use \Mediadevs\Configuration\Exceptions\InvalidReturnTypeException;
use \Mediadevs\Configuration\Exceptions\ConfigurationDirectoryException;
try {
$config = (new Configuration())
->directory('./config')
->config('config_file')
->get(Configuration::RETURN_TYPE_ARRAY);
/**
* Possible return types:
* array: (Configuration::RETURN_TYPE_ARRAY)
* Json: (Configuration::RETURN_TYPE_JSON)
*/
} catch (ConfigurationDirectoryException $e) {
echo $e->errorMessage();
} catch (ConfigurationFileException $e) {
echo $e->errorMessage();
} catch (InvalidReturnTypeException $e) {
echo $e->errorMessage();
}Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email contact@mediadevs.nl instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.


