2017 © Pedro Peláez
 

library silex-yaml-config-provider

Simple YAML config provider for Silex 1.3+

image

ronanchilvers/silex-yaml-config-provider

Simple YAML config provider for Silex 1.3+

  • Tuesday, January 12, 2016
  • by ronanchilvers
  • Repository
  • 1 Watchers
  • 1 Stars
  • 697 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 2 Versions
  • 4 % Grown

The README.md

YamlConfigServiceProvider

SensioLabsInsight, (*1)

A very simple YAML config provider for Silex 1.3+ allowing you to read your configuration in from YAML files., (*2)

Installation

The easiest mechanism is via composer. Add the provider to your composer.json:, (*3)

{
    "require": {
        "ronanchilvers/silex-yaml-config-provider": "dev-master"
    }
}

Usage

To register the service provider you can do something like this:, (*4)

$app->register(new \Ronanchilvers\Silex\Provider\YamlConfigServiceProvider(
    '/path/to/my/yaml/config.yml'
));

You can add the provider multiple times if you want to parse multiple files and the configuration will be merged together., (*5)

$app->register(new \Ronanchilvers\Silex\Provider\YamlConfigServiceProvider(
    '/path/to/my/yaml/config.base.yml'
));
$app->register(new \Ronanchilvers\Silex\Provider\YamlConfigServiceProvider(
    '/path/to/my/yaml/config.production.yml'
));

Services Exposed

The YamlConfigServiceProvider exposes the following services., (*6)

  • config - The parsed configuration data as an array

The Versions

12/01 2016

dev-master

9999999-dev

Simple YAML config provider for Silex 1.3+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ronan Chilvers

config silex yaml service provider

12/01 2016

0.1

0.1.0.0

Simple YAML config provider for Silex 1.3+

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ronan Chilvers