jayzeng/config-reader
最新稳定版本:v0.1
Composer 安装命令:
composer require jayzeng/config-reader
包简介
Ini config reader for PHP 5.3
README 文档
README
Project website: (http://jayzeng.github.com/config-reader/)
##Usage: config.ini
[production] username = 'jayzeng' password = 'password' [whitelistIps] ip[] = 127.0.0.1 ip[] = 192.168.0.1/24
use ConfigReader\Ini as IniReader; // read a specific rule $username = IniReader::factory( __DIR__ . DIRECTORY_SEPARATOR . 'config.ini' ) ->setLabel('production') ->getLabel('username'); // returns jayzeng
Read all rules within a label section
use ConfigReader\Ini as IniReader; // read all rules within production section $prodConfig = IniReader::factory( __DIR__ . DIRECTORY_SEPARATOR . 'config.ini' ) ->setLabel('production') ->toArray(); // returns // array // 'username' => 'jayzeng' // 'password' => 'password' // You can also populate an array $ips = IniReader::factory( __DIR__ . DIRECTORY_SEPARATOR . 'config.ini' ) ->setLabel('whitelistIps') ->toArray(); // returns // array // 'ip' => array ( '127.0.0.1', '192.168.0.1/24' );
##Issues & Development
- Source hosted GitHub
- Report issues, questions, feature requests on GitHub Issues
##How to release new version?
- RELEASE_VERSION - version number
- RELEASE_MESSAGE - release message
make release RELEASE_VERSION="0.1" RELEASE_MESSAGE="v0.1 is released"
##Author: Jay Zeng, e-mail: jayzeng@jay-zeng.com
统计信息
- 总下载量: 48
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-02-03