https://github.com/ceccode/env-config
https://github.com/ceccode/env-config
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ceccode/env-config
- Owner: ceccode
- License: mit
- Created: 2015-01-18T17:57:35.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-26T23:52:26.000Z (over 11 years ago)
- Last Synced: 2023-03-24T02:50:10.118Z (over 3 years ago)
- Language: PHP
- Size: 180 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# envconfig
[](https://travis-ci.org/ceccode/env-config)
[](https://scrutinizer-ci.com/g/ceccode/env-config/?branch=master)
env-config is a JSON config file loader based on environment var.
## examples
```php
//Apache
//setEnv environment production
$conf = Config::get('environment','config', (__DIR__ . '/my_config_dir'));
$conf = Config::get('environment', 'config')
$dbname = $conf['database']['name'];
```
###todo
• add tests
• add json file examples