garoevans/config_loader

Really simple ini config loader


License
MIT

Documentation

Config Loader

Latest Stable Version Build Status License

Installation

This library requires PHP 5.3 or later, and is installable and autoloadable via Composer as garoevans/config_loader.

Usage

use Garoevans\ConfigLoader;

$config = ConfigLoader('config_directory', 'ini_file_name.ini');
$config->load();

// Gets the ini section called 'db' or returns an empty array
$config->get('db', array());

// Gets the value of 'host' from the 'db' section or returns an empty string
$config->get('db/host', '');