2017 © Pedro Peláez
 

library configuration

The NiletPHP configuration component.

image

niletphp/configuration

The NiletPHP configuration component.

  • Friday, May 12, 2017
  • by tsvetelin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 26 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Makes working with php config arrays painless., (*1)

Requirements

PHP >= 7.0, (*2)

Install

Composer, (*3)

{
    "require": {
        "niletphp/configuration": ">=v1.0"
    }
}

Examples

$config = new Nilet\Components\Configuration\Config();

Set the config folder, (*4)

$configDir = new Nilet\Components\FileSystem\Directory("path/to/config/files");
$config->setConfigDir($configDir);

Get the config folder, (*5)

$configDir = $config->getConfigDir();

Retrieves a config array from a given config file, (*6)

/** 
* Lets assume that there is a config file called foo.php inside the config directory
* with the following array 
* [
*   "bar" => true,
*   "baz" => false
* ]
*/
$foo = $config->get("foo");
$foo["bar"];
$foo["baz"];

The Versions

12/05 2017

dev-master

9999999-dev

The NiletPHP configuration component.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Tsvetelin Tsonev

02/03 2017

v1.0.0

1.0.0.0

The NiletPHP configuration component.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Tsvetelin Tsonev