allmarkedup/conph
最新稳定版本:v0.2.1
Composer 安装命令:
composer require allmarkedup/conph
包简介
Configuration handler class.
README 文档
README
A little configuration class for PHP 5.4+.
Work In Progress. You have been warned.
Installation and use
Using composer:
$ composer require allmarkedup/conph
Example
<?php class MyConfig extends Amu\Conph\Config { public function convertPaths($value) { return array_map(function($item){ return '/my/base/path' . $item; }, $value); } } $config = new MyConfig([ "paths" => [ "templates" => "the_template_path", "config" => "the_config_path" ], "settings" => [ "debug" => true ], 'names' => [ "batman" => 'Fred', "superman" => 'Dave' ] ]); // Nested values - dot notation $debug = $config->get('settings.debug'); $config->set('names.batman', 'Clive'); // Custom converter functions $config->get('paths.templates'); // => /my/base/path/the_template_path
统计信息
- 总下载量: 112
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-11-05