PHPackages                             jomisacu/configloader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jomisacu/configloader

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jomisacu/configloader
=====================

A simple config system

v1.0.2(9y ago)035proprietaryPHP

Since Apr 10Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jomisacu/ConfigLoader)[ Packagist](https://packagist.org/packages/jomisacu/configloader)[ RSS](/packages/jomisacu-configloader/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

ConfigLoader
============

[](#configloader)

Provide a simple interface to handle configuration values.

Concepts
--------

[](#concepts)

### Config root directory

[](#config-root-directory)

It's a place to store all configuration files under environments represented by sub directories.

### Enviroment

[](#enviroment)

A environment represents a directory into directory root.

By default the selected environment is ConfigLoader::ENV\_PRODUCTION ("production"), to override this, you can put into config root directory a file named ENVIRONMENT.txt that contains a environment name, or, configure $\_SERVER\['ENVIRONMENT'\] var through http server. For example, you can set this var on apache adding the line below:

```
# httpd.conf or .htaccess
SetEnv ENVIRONMENT 'development'
```

### Config file

[](#config-file)

A config file is a pure php file that contains an array named $config with the specific scope values. Example:

```
