for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*
* This file is part of phpFastCache.
* @license MIT License (MIT)
* For full copyright and license information, please see the docs/CREDITS.txt file.
* @author Georges.L (Geolim4) <[email protected]>
* @author PastisD https://github.com/PastisD
* @author Khoa Bui (khoaofgod) <[email protected]> http://www.phpfastcache.com
*/
namespace phpFastCache\Bundle\DependencyInjection;
use phpFastCache\CacheManager;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
* Class Configuration
* @package phpFastCache\Bundle\DependencyInjection
class Configuration implements ConfigurationInterface
{
* {@inheritDoc}
* @throws \RuntimeException
public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('php_fast_cache');
$rootNode
->children()
->scalarNode('twig_driver')
->isRequired()
->end()
->booleanNode('twig_block_debug')
->defaultFalse()
->arrayNode('drivers')
->useAttributeAsKey('name')
->prototype('array')
->enumNode('type')->isRequired()->values(CacheManager::getStaticAllDrivers())->end() // @TODO : Add all available drivers
->arrayNode('parameters')->isRequired()->prototype('variable')->end()
->end();
return $treeBuilder;
}