for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Itkg\DelayEventBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
*/
class Configuration implements ConfigurationInterface
{
* {@inheritdoc}
public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('itkg_delay_event');
$rootNode
->fixXmlConfig('channel')
->children()
->scalarNode('command')
->defaultValue('process dynamic command')
->end()
->arrayNode('mailer')
->addDefaultsIfNotSet()
->scalarNode('from')->defaultValue('from')->end()
->scalarNode('to')->defaultValue('to')->end()
->scalarNode('subject')->defaultValue('subject')->end()
->arrayNode('processor')
->arrayNode('retry_count')
->scalarNode('normal')->defaultValue(1)->end()
->scalarNode('critic')->defaultValue(1)->end()
->arrayNode('events')
->prototype('array')
->enumNode('type')
->values(['normal', 'critic'])
->defaultValue('normal')
->arrayNode('channels')
->addDefaultChildrenIfNoneSet('default')
->useAttributeAsKey('name')
->booleanNode('dynamic')
->defaultFalse()
->integerNode('events_limit_per_run')
->defaultNull()
->min(0)
->integerNode('duration_limit_per_run')
->arrayNode('include')
->prototype('scalar')->end()
->arrayNode('exclude')
->end();
return $treeBuilder;
}