https://github.com/drmvc/config
Library for manipulation on project configurations
https://github.com/drmvc/config
config loader
Last synced: 3 months ago
JSON representation
Library for manipulation on project configurations
- Host: GitHub
- URL: https://github.com/drmvc/config
- Owner: drmvc
- License: mit
- Created: 2017-04-05T22:08:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-12T15:21:05.000Z (over 8 years ago)
- Last Synced: 2025-02-17T20:14:16.993Z (over 1 year ago)
- Topics: config, loader
- Language: PHP
- Homepage: https://drmvc.com/
- Size: 35.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://packagist.org/packages/drmvc/config)
[](https://travis-ci.org/drmvc/config)
[](https://packagist.org/packages/drmvc/config)
[](https://packagist.org/packages/drmvc/config)
[](https://travis-ci.org/drmvc/config)
[](https://codeclimate.com/github/drmvc/config)
[](https://scrutinizer-ci.com/g/drmvc/config/)
# DrMVC\Config
Library for manipulation with project configurations.
composer require drmvc/config
## How to use
```php
load(__DIR__ . '/array.php');
// Load file from filesystem and put into array with specific key
$config->load(__DIR__ . '/array.php', 'subarray');
$config->set('param_new', 'value'); // Add new text parameter
$config->set('param_arr', [1,2,3]); // Add new array parameter
$all = $config->get(); // Get all available parameters
$one = $config->get('param_new'); // Get single parameter
$arr = $config->get('param_arr'); // Get single parameter with array
```
More examples you can find [here](extra).
## About PHP Unit Tests
First need to install all dev dependencies via `composer update`, then
you can run tests by hands from source directory via `./vendor/bin/phpunit` command.
# Links
* [DrMVC Framework](https://drmvc.com)