2017 © Pedro Peláez
 

library yaml-config-service-provider

Based on deralex/YamlConfigServiceProvider YAML service provider for silex ~2.0 and symfony/yaml 3.~

image

rpodwika/yaml-config-service-provider

Based on deralex/YamlConfigServiceProvider YAML service provider for silex ~2.0 and symfony/yaml 3.~

  • Thursday, September 15, 2016
  • by rpodwika
  • Repository
  • 1 Watchers
  • 4 Stars
  • 16,112 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 12 % Grown

The README.md

YamlConfigServiceProvider for Silex ~2.0

Usage

<?php

require_once __DIR__.'/../vendor/autoload.php';

$app = new Silex\Application();

$app->register(new Rpodwika\Silex\YamlConfigServiceProvider(PATH_TO_CONFIG_FILE));

echo $app['config']['database']['driver'];
...

where PATH_TO_CONFIG_FILE is location of YML file with configuration for example __DIR__ . "/../app/config/parameters.yml", (*1)

considering following directory structure:, (*2)

  • app
    • config
      • parameters.yml
  • web
    • index.php

parameters.yml, (*3)

    database:
          driver :  'pdo_mysql'
          dbhost :  'localhost'
          dbname :  'mydbname'
          user :    'root'
          password : ''

Installation

Add to composer.json, (*4)

"require": {
    "rpodwika/yaml-config-service-provider": "dev-master"
}

or run command composer require rpodwika/yaml-config-service-provider, (*5)

This bundle is inspired on deralex/YamlConfigServiceProvider, (*6)

Licence

GPL 3.0, (*7)

The Versions

15/09 2016

dev-master

9999999-dev

Based on deralex/YamlConfigServiceProvider YAML service provider for silex ~2.0 and symfony/yaml 3.~

  Sources   Download

GPL-3.0+

The Requires

 

15/09 2016

dev-develop

dev-develop

Based on deralex/YamlConfigServiceProvider YAML service provider for silex ~2.0 and symfony/yaml 3.~

  Sources   Download

GPL-3.0+

The Requires

 

15/09 2016

1.0.1

1.0.1.0

Based on deralex/YamlConfigServiceProvider YAML service provider for silex ~2.0 and symfony/yaml 3.~

  Sources   Download

GPL-3.0+

The Requires

 

15/09 2016

1.0.0

1.0.0.0

Based on deralex/YamlConfigServiceProvider YAML service provider for silex ~2.0 and symfony/yaml 3.~

  Sources   Download

GPL-3.0+

The Requires