承接 robotdance/php-app-config 相关项目开发

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

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

robotdance/php-app-config

Composer 安装命令:

composer require robotdance/php-app-config

包简介

A PHP helper component to store package/application settings

README 文档

README

Code Climate Test Coverage Issue Count Build Status

PHP-app-config is a component to store application/package settings, also capable of storing it per environment if necessary.

Setup

PHP-app-config uses Composer as dependency management tool. Create or ppdate your composer.json file and run:

$ composer install or $ composer update

Use

Create a folder called config/ at your app/package, and put your YAML config.yml file there. (an example of valid YAML file can found in the source). Then call Config::get, in one of the ways below.

YAML Config file structure

Your YAML config.yml file may look like this:

some_setting:
  development: some setting development
  test: some setting test
  production: some setting production

another_setting: another setting without environment

This way you can store settings depending on environment or not. Your choice. In order to have environment specific settings, you must set an environment variable called "ENVIRONMENT", with a value that can be found at your config file.

Example

The example below will try to find the key variable_name.[environment] at /config/config.yml:

use robotdance\Config;
...
$value = Config::get('variable_name');

Running tests

$ ./bin/phpunit

Contribute

Fork, write tests, code, submit pull request. Coverage must remains at 100%.

统计信息

  • 总下载量: 333
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-06-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固