承接 blast/config 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

blast/config

最新稳定版本:1.0.2

Composer 安装命令:

composer require blast/config

包简介

Framework agnostic configuration package

README 文档

README

Latest Version on Packagist Software License Build Status Total Downloads Coverage Status

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

GitHub 信息

  • Stars: 8
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-26