2017 © Pedro Peláez
 

library config

Lightweight configuration manager library.

image

joebengalen/config

Lightweight configuration manager library.

  • Friday, April 10, 2015
  • by JoeBengalen
  • Repository
  • 1 Watchers
  • 3 Stars
  • 73 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Config

Build Status Software License SensioLabsInsight, (*1)

Config library can be used to store configuration options, which can be used later in the application. The set, get, has and remove methods as well as \ArrayAccess can be used to control the configuration options. For easy usage dot notation is supported to access nested arrays., (*2)

The source code is very easy to understand and can be extended to support more functionality when needed., (*3)

Installation

Via Composer, (*4)

$ composer require joebengalen/config

Usage

<?php

require_once 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

// Instantiate the config object.
$config = new \JoeBengalen\Config\Config();

// Load a php config file info the config object.
$config->load(__DIR__ . DIRECTORY_SEPARATOR . 'config.php');

// Set some more configurations.
$config->set([
    'database.host' => '127.0.0.1',
    'database.user' => 'root',
]);

// Show an array of all database configurations
var_dump($config->get('database'));

Testing

PHPUnit is used for testing. The source code is 100% covered., (*5)

There is an phpunit.xml.dist file with some default settings for phpunit., (*6)

$ phpunit

Note: phpunit is not included. The command assumes phpunit is installed globally., (*7)

The Versions

10/04 2015

dev-develop

dev-develop https://github.com/JoeBengalen/Config

Lightweight configuration manager library.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Martijn Wennink

configuration config

08/04 2015

dev-master

9999999-dev https://github.com/JoeBengalen/Config

Lightweight configuration manager library.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Martijn Wennink

configuration config

08/04 2015

1.0.0

1.0.0.0 https://github.com/JoeBengalen/Config

Lightweight configuration manager library.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Martijn Wennink

configuration config