dragooon/yaml-file-config
Composer 安装命令:
composer require dragooon/yaml-file-config
包简介
Yaml file configuration handler
README 文档
README
Simple library for loading and accessing configuration stored in .yml files. It relies on symfony/yaml for its functions. The library avoids loading Yaml file until requested (lazy loading) to avoid unnecessary loading and parsing.
Installation
You can install the project via composer
composer require dragooon/yaml-file-config
Usage
config.yml
timeout: 10 parameter: a: 1 b: 2 name: abc
app.php
$config = new \Dragooon\YamlFileConfig\YamlFileConfig('config.yml'); echo $config['timeout']; // 10 echo $config['parameter']['a']; // 1; echo $config->get('name'); // abc // You can also modify the configuration by either of the following $config['timeout'] = 20; $config->set('parameter', [ 'a' => 2, 'b' => 3, ]); // And finally save the file to write into config.yml $config->save();
License
The project is licensed under The MIT License. See LICENSE for more information.
统计信息
- 总下载量: 40
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-12-27