PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Rafael Espinosa   Silex YAML Configuration Service Provider   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Auxiliary data
Class: Silex YAML Configuration Service Provider
Load and parse YAML configuration files for Silex
Author: By
Last change:
Date: 9 years ago
Size: 711 bytes
 

Contents

Class file image Download

Yaml Config Service Provider

Yaml config service provider for Silex.

Currently supports imports statements and parameters substitution. See an example from Silex Enhanced.

...
$app->register(
    new \Fluency\Silex\Provider\YamlConfigServiceProvider(
        array(
            '%base_path%' => BASEPATH, '%log_path%' => BASEPATH . '/var/logs',
            '%cache_path%' => BASEPATH . '/var/cache'
        )
    ),
    array(
        'config.dir' => BASEPATH . '/app/Resources/config',
        'config.files' => array('application.yml', 'routing.yml', 'security.yml'),
    )
);
...