2017 © Pedro Peláez
 

library php-app-config

A PHP helper component to store package/application settings

image

robotdance/php-app-config

A PHP helper component to store package/application settings

  • Tuesday, June 28, 2016
  • by MarcosMenegazzo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 139 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 3 % Grown

The README.md

PHP-App-Config

Code Climate Test Coverage Issue Count Build Status, (*1)

PHP-app-config is a component to store application/package settings, also capable of storing it per environment if necessary., (*2)

Setup

PHP-app-config uses Composer as dependency management tool. Create or ppdate your composer.json file and run:, (*3)

$ composer install or $ composer update, (*4)

Use

Create a folder called config/ at your app/package, and put your YAML config.yml file there. (an example of valid YAML file can found in the source). Then call Config::get, in one of the ways below., (*5)

YAML Config file structure

Your YAML config.yml file may look like this:, (*6)

some_setting:
  development: some setting development
  test: some setting test
  production: some setting production

another_setting: another setting without environment

This way you can store settings depending on environment or not. Your choice. In order to have environment specific settings, you must set an environment variable called "ENVIRONMENT", with a value that can be found at your config file., (*7)

Example

The example below will try to find the key variable_name.[environment] at /config/config.yml:, (*8)

use robotdance\Config;
...
$value = Config::get('variable_name');

Running tests

$ ./bin/phpunit, (*9)

Contribute

Fork, write tests, code, submit pull request. Coverage must remains at 100%., (*10)

The Versions

28/06 2016

dev-master

9999999-dev

A PHP helper component to store package/application settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcos Menegazzo

component settings php config yaml yml

28/06 2016

v0.0.9

0.0.9.0

A PHP helper component to store package/application settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcos Menegazzo

component settings php config yaml yml

20/06 2016

v0.0.8

0.0.8.0

A PHP helper component to store package/application settings

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • ext-yaml *

 

The Development Requires

by Marcos Menegazzo

component settings php config yaml yml

20/06 2016

v0.0.7

0.0.7.0

A PHP helper component to store package/application settings

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • ext-yaml *

 

The Development Requires

by Marcos Menegazzo

component settings php config yaml yml

20/06 2016

v0.0.6

0.0.6.0

A PHP helper component to store package/application settings

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • ext-yaml *

 

The Development Requires

by Marcos Menegazzo

component settings php config yaml yml

20/06 2016

v0.0.5

0.0.5.0

A PHP helper component to store package/application settings

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • ext-yaml *

 

The Development Requires

by Marcos Menegazzo

component settings php config yaml yml

17/06 2016

v0.0.4

0.0.4.0

A PHP helper component to store package/application settings

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • ext-yaml *

 

The Development Requires

by Marcos Menegazzo

component settings php config yaml yml

17/06 2016

v0.0.3

0.0.3.0

A PHP helper component to store package/application settings

  Sources   Download

MIT

The Requires

  • php >=5.3.2
  • ext-yaml *

 

The Development Requires

by Marcos Menegazzo

component settings php config yaml yml

10/06 2016

v0.0.2

0.0.2.0

A PHP helper component to store package/application settings

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Marcos Menegazzo

component settings php config yaml yml

10/06 2016

v0.0.1

0.0.1.0

A PHP helper component to store package/application settings

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Marcos Menegazzo

component settings php config yaml yml