https://github.com/opensourceame/config
https://github.com/opensourceame/config
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/opensourceame/config
- Owner: opensourceame
- Created: 2012-11-21T16:13:36.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-12-20T09:01:04.000Z (over 13 years ago)
- Last Synced: 2026-05-24T00:33:32.679Z (11 days ago)
- Language: PHP
- Size: 113 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a flexible config class.
The objective of this Config handler is to be able to read and write
configuration in a predictable, standard manner from a variety of formats.
Formats include:
* YAML
* JSON
* XML
* Arrays
* Redis
* DB (using PDO)
* Command line (using CLI arguments)
Config, once parsed, is represented in a namespaced fashion like so:
* server:db:host => localhost
* server:db:db => my_database
Thus to get the host name for the database server you would:
$config->get('server:db:host')
and, of course, there's an equivalent setter. You can also get multiple options using a wildcard:
$config->get('server:db:*') // returns an array of db settings