承接 emmetog/config 相关项目开发

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

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

emmetog/config

Composer 安装命令:

composer require emmetog/config

包简介

Makes loading and using config files easier

关键字:

README 文档

README

Handles configuration files and settings in a neat package.

This package is the heart of many other packages. The config object is a dependency injection container which is passed to other objects on their contruction. Then that object will be able to get all its settings from the config object. This makes it possible to give two different instances of the same object different config objects and have them behave differently! Cool huh!

This package contains two different classes:

  • Config (The real config object)
  • ConfigForMocking (A 'fake' config object, useful in unit tests when we want to give errors when unmocked configs are used)

Installation

This package is easy to install using Composer, to get started just add it to your composer.json file.

For example:

"require": {
    "emmetog/config":    "1.0.*",
    "emmetog/cache":     "1.0.*",
}

This package requires the Emmetog\Cache package, that's why it's also required above.

Usage

Just create the object you want and use it, for example:

$config = new Emmetog\Config\Config('/project/path/config/', new NullCache());

// Get the 'text_color' config variable from the 'theme.config.php' config file.
$textColor = $config->getConfiguration('theme', 'text_color');

In the example above the file 'theme.config.php' should have something like this inside:

<?php
# File /project/path/config/theme.config.php
$config['text_color'] = 'red';
?>

Miscellaneous

This package follows the semantic versioning guidelines.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2013-07-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固