Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marella/phig
PHP Config library.
https://github.com/marella/phig
Last synced: 2 days ago
JSON representation
PHP Config library.
- Host: GitHub
- URL: https://github.com/marella/phig
- Owner: marella
- License: mit
- Created: 2016-03-03T06:40:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-03-20T16:34:27.000Z (over 8 years ago)
- Last Synced: 2024-09-20T14:47:55.345Z (7 days ago)
- Language: PHP
- Homepage: https://github.com/marella/phig/wiki
- Size: 50.8 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Phig
[![Coverage Status](https://coveralls.io/repos/github/marella/phig/badge.svg?branch=master)](https://coveralls.io/github/marella/phig?branch=master)
[![Build Status](https://travis-ci.org/marella/phig.svg?branch=master)](https://travis-ci.org/marella/phig)
[![StyleCI](https://styleci.io/repos/53027491/shield?style=flat)](https://styleci.io/repos/53027491)
[![Latest Stable Version](https://poser.pugx.org/marella/phig/v/stable)](https://packagist.org/packages/marella/phig) [![Total Downloads](https://poser.pugx.org/marella/phig/downloads)](https://packagist.org/packages/marella/phig) [![Latest Unstable Version](https://poser.pugx.org/marella/phig/v/unstable)](https://packagist.org/packages/marella/phig) [![License](https://poser.pugx.org/marella/phig/license)](https://packagist.org/packages/marella/phig)PHP Config Library.
### Quick Usage
```sh
composer require marella/phig
``````php
read(__DIR__.'/config');$timezone = $config['app.timezone']; // 'UTC'
$locale = $config['app']['locale']; // 'en'
$database = $config['database']; // array
$host = $database['host']; // 'localhost'
```where `config` directory contains these files:
`app.php`
```php
'UTC',
'locale' => 'en',
];
````database.php`
```php
'localhost',
'database' => 'forge',
'username' => 'forge',
'password' => '',
];
```### Documentation
See the **[wiki]** for more details and documentation.### Contributing
See [contributing guidelines] before creating issues or pull requests.### License
Open-source software released under [the MIT license][license].[wiki]: https://github.com/marella/phig/wiki
[contributing guidelines]: /.github/CONTRIBUTING.md
[license]: /LICENSE