承接 joebengalen/config 相关项目开发

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

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

joebengalen/config

最新稳定版本:1.0.0

Composer 安装命令:

composer require joebengalen/config

包简介

Lightweight configuration manager library.

README 文档

README

Build Status Software License SensioLabsInsight

Config library can be used to store configuration options, which can be used later in the application. The set, get, has and remove methods as well as \ArrayAccess can be used to control the configuration options. For easy usage dot notation is supported to access nested arrays.

The source code is very easy to understand and can be extended to support more functionality when needed.

Installation

Via Composer

$ composer require joebengalen/config

Usage

<?php

require_once 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

// Instantiate the config object.
$config = new \JoeBengalen\Config\Config();

// Load a php config file info the config object.
$config->load(__DIR__ . DIRECTORY_SEPARATOR . 'config.php');

// Set some more configurations.
$config->set([
    'database.host' => '127.0.0.1',
    'database.user' => 'root',
]);

// Show an array of all database configurations
var_dump($config->get('database'));

Testing

PHPUnit is used for testing. The source code is 100% covered.

There is an phpunit.xml.dist file with some default settings for phpunit.

$ phpunit

Note: phpunit is not included. The command assumes phpunit is installed globally.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-06