keiii/silex-yaml-config

此包已被弃用,不再维护。未建议替代包。

YAML配置服务提供商。

2.4 2016-09-08 14:30 UTC

This package is not auto-updated.

Last update: 2023-03-04 10:59:57 UTC


README

为silex应用提供类似symfony的配置样式。

安装

composer require keiii/silex-yaml-config

使用方法

<?php
$app->register(new \KEIII\YamlConfigServiceProvider\YamlConfigServiceProvider(), [
    'config.path' => __DIR__.'/config',
    // 'config.cache_path' => '/var/tmp',
    // 'config.replacements' => ['root_path' => __DIR__],
    // 'config.env' => 'dev',
    // 'config.index' => 'config.yml',
    // 'config.loader' => LoaderInterface,
]);
$app['config']['key']; // value;