24hoursmedia / tesla-silex-configurationmanager
此包已被弃用且不再维护。未建议替代包。
用于Sylex的配置管理器
0.1.2
2014-05-16 07:53 UTC
This package is not auto-updated.
Last update: 2020-02-06 00:25:33 UTC
README
Silex项目的配置管理器
安装
添加到你的composer.json文件中
"require": {
"24hoursmedia/tesla-silex-configurationmanager": "0.1.1"
},
通用用法
注册为服务
// configure your app for the production environment
$app['config'] = $app->share(
function () {
$parameterFile = __DIR__ . '/parameters.json';
$confDir = __DIR__ . '/conf.d';
$service = new \Tesla\Silex\ConfigurationManager\ConfigurationManager($parameterFile);
$service->registerConfigFiles(
array(
$confDir . '/conffile1.json',
$confDir . '/conffile2.conf.json'
)
);
return $service;
}
);