jowy / silex-config-service-provider

Silex 配置服务提供者

v1.1.2 2015-04-29 04:59 UTC

This package is not auto-updated.

Last update: 2024-09-14 17:00:51 UTC


README

为 Silex 提供配置服务

用法

安装

基于 yaml 的配置

$this->app->register(new ConfigServiceProvider("path/to/config.yml"));

基于 php 数组的配置

$this->app->register(new ConfigServiceProvider("path/to/config.php"));

访问配置

$app["config"]->get("key/subkey/subsubkey");

许可证

MIT,见 LICENSE