2017 © Pedro Peláez
 

library conph

Configuration handler class.

image

allmarkedup/conph

Configuration handler class.

  • Saturday, March 7, 2015
  • by allmarkedup
  • Repository
  • 0 Watchers
  • 0 Stars
  • 93 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 2 % Grown

The README.md

Conph

A little configuration class for PHP 5.4+., (*1)

Work In Progress. You have been warned., (*2)

Installation and use

Using composer:, (*3)

$ composer require allmarkedup/conph

Example

<?php

class MyConfig extends Amu\Conph\Config
{
    public function convertPaths($value)
    {
        return array_map(function($item){
            return '/my/base/path' . $item;
        }, $value);
    }
}

$config = new MyConfig([
    "paths" => [
        "templates" => "the_template_path",
        "config" => "the_config_path"
    ],
    "settings" => [
        "debug" => true
    ],
    'names' => [
        "batman" => 'Fred',
        "superman" => 'Dave'
    ]
]);

// Nested values - dot notation
$debug = $config->get('settings.debug');
$config->set('names.batman', 'Clive');

// Custom converter functions
$config->get('paths.templates'); // => /my/base/path/the_template_path

The Versions

07/03 2015

dev-master

9999999-dev

Configuration handler class.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mark Perkins

27/02 2015

v0.2.1

0.2.1.0

Configuration handler class.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mark Perkins

27/02 2015

v0.2

0.2.0.0

Configuration handler class.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mark Perkins

06/11 2014

v0.1

0.1.0.0

Configuration handler class.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mark Perkins