2017 © Pedro Peláez
 

application dotconfig

Wraps input config file with simple interface with get method, wich accepts doted request string (->get('config.ttl'))

image

knyga/dotconfig

Wraps input config file with simple interface with get method, wich accepts doted request string (->get('config.ttl'))

  • Monday, February 17, 2014
  • by knyga
  • Repository
  • 1 Watchers
  • 0 Stars
  • 27 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

DotConfig

Wraps input config file with simple interface with get method, wich accepts doted request string (->get('config.ttl')), (*1)

Example

Code:, (*2)

<?php

use DotConfig\Config;

$config = require __DIR__.'/Resources/files/correct_config.php';
$this->config = new Config($config);
$ttl = $this->config->get('client.cache.ttl');

Input file:, (*3)

<?php

return array(
    "client" => array(
        "cache" => array(
            "ttl" => 3600,
        )
    )
);

Installation via Composer

  • Install Composer to your project root:, (*4)

    curl -sS https://getcomposer.org/installer | php
    
  • Add a composer.json file to your project:, (*5)

    {
      "require" {
        "knyga/dotconfig": "1.0.*@dev"
      }
    }
    
  • Run the Composer installer:, (*6)

    php composer.phar install
    

License

DotConfig is licensed under the MIT license., (*7)

Sobit Akhmedov sobit.akhmedov@gmail.com, (*8)

Oleksandr Knyga oleksandrknyga@gmail.com, (*9)

The Versions

17/02 2014

dev-master

9999999-dev https://github.com/knyga/dotconfig

Wraps input config file with simple interface with get method, wich accepts doted request string (->get('config.ttl'))

  Sources   Download

MIT

The Requires

  • php >= 5.4

 

The Development Requires

by Oleksandr Knyga
by Sobit Akhmedov

config