2017 © Pedro Peláez
 

library config

The Panda Config Package.

image

panda/config

The Panda Config Package.

  • Sunday, January 14, 2018
  • by ioannis-papikas
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Configuration

[READ-ONLY] Subtree split of the Panda Config Package, (*1)

Introduction

All of the configuration files for the Panda framework are stored in the config directory. The main configuration file is named config-default followed by the extension according to the configuration type., (*2)

The main configuration file should include all the necessary config values for all the different services or features of your application., (*3)

Shared Configuration

The configuration values are being loaded in a common/shared configuration that is accessible during runtime at any time without the access to the configuration object., (*4)

Shared configuration is a sub-set of the shared registry and it can keep its values during runtime across different objects., (*5)

Configuration parsers

The default configuration parser for the configuration files is the \Panda\Config\Parsers\JsonParser which support json files., (*6)

The job of the parsers (from the config package) is to parse the configuration files and return an array of their values., (*7)

Accessing Configuration Values

You may easily access your configuration values using the SharedConfiguration object. The configuration values may be accessed using "dot" syntax, which is being translated in encapsulated groups of values. A default value may also be specified and will be returned if the configuration option does not exist:, (*8)

use \Panda\Config\SharedConfiguration;

$config = new SharedConfiguration();
$value = $config->get('routes.base_dir', $default = null);

You can also set configuration values at runtime:, (*9)

use \Panda\Config\SharedConfiguration;

$config = new SharedConfiguration();
$config->set('logger.enabled', false);

The Versions

14/01 2018

2.1.x-dev

2.1.9999999.9999999-dev http://pandaphp.org

The Panda Config Package.

  Sources   Download

MIT

The Requires

 

The Development Requires

28/08 2017

2.0.x-dev

2.0.9999999.9999999-dev http://pandaphp.org

The Panda Config Package.

  Sources   Download

MIT

The Requires

 

The Development Requires

26/06 2017

dev-master

9999999-dev http://pandaphp.org

The Panda Config Package.

  Sources   Download

MIT

The Requires

 

The Development Requires

26/06 2017

v2.0.0

2.0.0.0 http://pandaphp.org

The Panda Config Package.

  Sources   Download

MIT

The Requires

 

The Development Requires