garoevans/config_loader

Really simple ini config loader

v0.0.1 2014-07-17 08:56 UTC

This package is not auto-updated.

Last update: 2024-11-05 02:28:14 UTC


README

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', '');