PHP code example of maxwell2022 / yamlconfigprovider

1. Go to this page and download the library: Download maxwell2022/yamlconfigprovider library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

maxwell2022 / yamlconfigprovider example snippets


$app->register(new \Maxwell2022\Silex\Provider\YamlConfigProvider(), array(
    'config.file' => __DIR__.'/config/config.yml'
));

$app['cache.path'] = __DIR__.'/../cache';

$app->register(new \CHH\Silex\CacheServiceProvider, array(
    'cache.options' => array(
        'default' => array('driver' => 'apc'),
        'file' => array(
            'driver' => 'filesystem',
            'directory' => $app['cache.path']
        )
    )
));

$app->register(new \Maxwell2022\Silex\Provider\YamlConfigProvider(), array(
    'config.file' => __DIR__.'/Config/config.yml',
));