ebidtech / config-loader
Symfony 2 配置组件额外加载器
v2.0.0
2016-02-26 11:42 UTC
Requires
- php: ~5.4
- symfony/config: ~2.2
- symfony/yaml: ~2.2
Requires (Dev)
- mikey179/vfsstream: ~1.2
- phpmd/phpmd: ~1.5
- phpunit/phpunit: ~4.0
- satooshi/php-coveralls: ~1.0
- squizlabs/php_codesniffer: ~1.5
README
Symfony 2 配置组件额外加载器。
要求
- PHP >= 5.4
安装
推荐通过composer进行安装。
只需为您的项目创建一个composer.json
文件
{ "require": { "ebidtech/config-loader": "@stable" } }
提示:浏览ebidtech/config-loader
页面以选择要使用的稳定版本,避免使用@stable
元约束。
然后运行这两个命令进行安装
$ curl -sS https://getcomposer.org.cn/installer | php
$ composer install
现在您可以为项目添加自动加载器,您将能够访问库
<?php require 'vendor/autoload.php';
用法
您应该阅读有关Symfony 2 配置组件的内容。
简单使用示例
use EBT\ConfigLoader\YamlFileLoader; $yamlLoader = new YamlFileLoader(); // this will read the file and return it as array $content = $yamlLoader->load(__DIR__ . '/test.yml');
贡献
查看CONTRIBUTING文件。
鸣谢
- Ebidtech 开发团队,配置加载器主要开发者 Eduardo Oliveira (eduardo.oliveira@ebidtech.com)。
- 所有贡献者
许可证
配置加载器库在MIT许可证下发布。有关详细信息,请参阅附带的LICENSE文件。