2017 © Pedro Peláez
 

library config

lazy load configuration data from php files returning associative arrays

image

luracast/config

lazy load configuration data from php files returning associative arrays

  • Wednesday, May 18, 2016
  • by Arul
  • Repository
  • 1 Watchers
  • 3 Stars
  • 24,166 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 4 Versions
  • 16 % Grown

The README.md

Config

Latest Stable Version Total Downloads Latest Unstable Version License Build Status, (*1)

Config class for loading configuration arrays from various files and provide easy access to nested properties with dot syntax, (*2)

Lazy loads configuration information when requested using Config::get('file.property','default_value') or $config['file.property'], (*3)

For example :-, (*4)

Config::get('database.connections.sqlite', [])

will load database.php which returns an array that contains connections property which contains the sqlite property value of which will be returned. $path given in the constructor is the path it will look for the file. If file does not exist or the property does not exist, then the default value (set by the second parameter) will be returned., (*5)

If there is no default value, null will be returned., (*6)

When an environment string is specified, it will look for a folder with that name inside the path and use the returned array to override the properties is original config file thus allowing some customization, (*7)

Setting A Configuration Value

Notice that "dot" style syntax may be used to access values in the various files. You may also set configuration values at run-time:, (*8)

Config::set('database.default', 'sqlite');

Configuration values that are set at run-time are only set for the current request, and will not be carried over to subsequent requests., (*9)

The Versions

18/05 2016

dev-master

9999999-dev

lazy load configuration data from php files returning associative arrays

  Sources   Download

LGPL2

The Requires

  • php >=5.3.0

 

The Development Requires

by Luracast

18/05 2016

2.0.0

2.0.0.0

lazy load configuration data from php files returning associative arrays

  Sources   Download

LGPL2

The Requires

  • php >=5.3.0

 

The Development Requires

by Luracast

18/05 2016

1.0.1

1.0.1.0

lazy load configuration data from php files returning associative arrays

  Sources   Download

LGPL2

The Requires

  • php >=5.3.0

 

The Development Requires

by Luracast

13/07 2014

1.0.0

1.0.0.0

lazy load configuration data from php files returning associative arrays

  Sources   Download

LGPL2

The Requires

  • php >=5.3.0

 

The Development Requires

by Luracast