2017 © Pedro Peláez
 

library tale-config

Lightweight configuration interfaces and utilities

image

talesoft/tale-config

Lightweight configuration interfaces and utilities

  • Tuesday, March 1, 2016
  • by TorbenKoehn
  • Repository
  • 3 Watchers
  • 1 Stars
  • 17,418 Installations
  • PHP
  • 8 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 8 % Grown

The README.md

Tale Config

A Tale Framework Component, (*1)

What is Tale Config?

A small configuration utility library. It supports different adapters and a few utilities to handle option arrays and configurable objects, (*2)

Installation

Install via Composer, (*3)

composer require "talesoft/tale-config:*"
composer install

Usage

The ConfigurableTrait


use Tale\ConfigurableInterface; use Tale\ConfigurableTrait; class DbConnection implements ConfigurableInterface { use ConfigurableTrait; public function __construct(array $options = null) { $this->defineOptions([ 'host' => 'localhost', 'user' => 'root', 'password' => '', 'encoding' => 'utf-8', 'databases' => [ 'db1' => 'database_1', 'db2' => 'database_2' } ], $options); var_dump($this->getOptions()); //The current options var_dump($this->getOption('databases'); //['db1' => 'database_1', 'db2' => 'database_2'] var_dump($this->getOption('databases.db1'); //database_1 var_dump($this->getOption('databases.db2'); //database_2 } }

The Versions

01/03 2016

dev-master

9999999-dev http://docs.talesoft.io/tale-framework/tale/config

Lightweight configuration interfaces and utilities

  Sources   Download

MIT

The Requires

 

by Torben Koehn

config options

01/03 2016

0.2

0.2.0.0 http://docs.talesoft.io/tale-framework/tale/config

Lightweight configuration interfaces and utilities

  Sources   Download

MIT

The Requires

 

by Torben Koehn

config options

29/02 2016

0.1

0.1.0.0 http://docs.talesoft.io/tale-framework/tale/config

Lightweight configuration interfaces and utilities

  Sources   Download

MIT

The Requires

 

by Torben Koehn

config options