定制 shazam/easy-config 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

shazam/easy-config

最新稳定版本:0.3.1

Composer 安装命令:

composer require shazam/easy-config

包简介

Reads Yaml config files

关键字:

README 文档

README

Simple PHP library to read from yaml files.

Usage

Place the following code in the constructor of your class or the superclass:

use EasyConfig\Config;

$config = Config::getInstance();
$config->setUseCache(false); //Default is true, so no need to specify if you want to use APC
$config->loadConfig(
    array(
        __DIR__ . '/../config/environment.yml',
        __DIR__ . '/../config/properties.yml'
    )
);

Somewhere else in your code you can load a config value, by calling $config->fetch() and the headings of the value:

$config = Config::getInstance();
$var = $config->fetch('heading', 'subheading');               //Fetches value under [heading][subheading]
$var = $config->fetch('heading', 'subheading', 'subheading'); //Fetches value under [heading][subheading][subheading]
$var = $config->fetch();                                      //Fetches the whole config

You can specify as many keys as you want when fetching config values.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 15
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2014-11-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固