2017 © Pedro Peláez
 

library tunny

A module for parse configuration files

image

gfonseca/tunny

A module for parse configuration files

  • Monday, September 4, 2017
  • by gfonseca
  • Repository
  • 2 Watchers
  • 2 Stars
  • 278 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 6 Versions
  • 8 % Grown

The README.md

Tunny

T u n n y, (*1)

tunny:master, (*2)

A simple configuration file parse

Instalation:

$ composer require gfonseca/tunny

Example:

system_php_array.php, (*3)

<?php

return array(
    "system" => array(
        "os" => "Ubuntu",
        "hd" => "1000000GB"
    )
);

system_json.json, (*4)

{
"system": {
    "os": "Fedora",
    "memory": 899789
    }
}

network_ini_file.ini, (*5)

[system]
cpu = Intel
[network]
modem=U.S. Robotics

system_yaml.yml, (*6)

system:
    memory: 99999999
    environment:
        iface2: Gnome

sample.php, (*7)

<?php

require __DIR__."/../vendor/autoload.php";

$tunny = \Tunny\Config::make([
    "./system_php_array.php",
    "./network_json.json",
    "./system_ini_file.ini",
    "./system_yaml.yml"
]);


$conf = $tunny->get();
print_r($conf);

output, (*8)

Array
(
    [system] => Array
        (
            [os] => Fedora
            [hd] => 1000000GB
            [memory] => 99999999
            [cpu] => Intel
            [environment] => Array
                (
                    [iface2] => Gnome
                )

        )

    [network] => Array
        (
            [modem] => U.S. Robotics
        )

)

Defining default values

class SampleDefaults extends \Tunny\Config
{
    protected function defaults(){
        return array(
            "System" => "Ubuntu"
        );
    }
}

The Versions

04/09 2017

dev-master

9999999-dev https://gfonseca.github.io/tunny

A module for parse configuration files

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Georgio Barbosa

04/09 2017

v1.4.2

1.4.2.0 https://gfonseca.github.io/tunny

A module for parse configuration files

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Georgio Barbosa

01/09 2017

v1.4

1.4.0.0 https://gfonseca.github.io/tunny

A module for parse configuration files

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Georgio Barbosa

01/09 2017

v1.2

1.2.0.0 https://gfonseca.github.io/tunny

A module for parse configuration files

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Georgio Barbosa

01/09 2017

v1.1

1.1.0.0 https://gfonseca.github.io/tunny

A module for parse configuration files

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Georgio Barbosa

01/09 2017

v1.0

1.0.0.0

A module for parse configuration files

  Sources   Download

The Requires

 

The Development Requires

by Georgio Barbosa