承接 tailored-tunes/php-env-config 相关项目开发

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

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

tailored-tunes/php-env-config

最新稳定版本:1.0.1

Composer 安装命令:

composer require tailored-tunes/php-env-config

包简介

A lightweight configuration management solution

关键字:

README 文档

README

A small config library for php that enables you to read environment variables, but override them with a config file too.

The reason behind this library is that we don't believe in stored configuration. Each environment is different, and code deployed to any machine might have completely different configurations. Therefore there's no sense in hardcoding anything. Nevertheless, during development it is painful to deal with environmental variables, so support for VCS ignored but easy to maintain file configuration was necessary.

Installation

Install via composer. Installation help and versions at Packagist

Usage

use TailoredTunes/Config;

$config = new Configuration($_ENV, 'developer.ini');

$config->define('SOME_CONSTANT','defaultValue');

$configuredValue = $config->get('configName','defaultValue');

If developer.ini is present, the values found there will be taken. It is a good practice to add developer.ini to the ignore list of your VCS, so all team members could have their own configurations regardless of the main configuration.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-28