blast/config
最新稳定版本:1.0.2
Composer 安装命令:
composer require blast/config
包简介
Framework agnostic configuration package
README 文档
README
Framework agnostic configuration package supporting php and json. More file types under development.
Install
Via Composer
$ composer require blast/config
Usage
Only a few lines of code:
<?php
$factory = new Factory();
// define your base location for all configurations
$locator = $factory->create(__DIR__ . '/res');
// receive config from json as array
$config = $factory->load('/config/config.json', $locator);
// receive config as array
$config = $factory->load('/config/config.php', $locator);
Dependency injection
Configure ServiceProvider and Facade.
<?php
$container = new Container();
$container->addServiceProvider(new ConfigServiceProvider());
FacadeFactory::setContainer($container);
Load your configuration.
<?php
// define your base location for all configurations
Config::create(__DIR__ . '/res');
// receive config from json as array
$config = Config::load('/config/config.json', $locator);
Further development
Please visit our milestones
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 32
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-10-26