2011-09-08 17:02:40 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Gregwar\CaptchaBundle\DependencyInjection;
|
|
|
|
|
|
|
|
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
|
|
|
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
|
|
|
|
|
|
|
class Configuration implements ConfigurationInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Generates the configuration tree.
|
|
|
|
* @return TreeBuilder
|
|
|
|
*/
|
|
|
|
public function getConfigTreeBuilder()
|
|
|
|
{
|
|
|
|
$treeBuilder = new TreeBuilder();
|
|
|
|
$rootNode = $treeBuilder->root('gregwar_captcha', 'array');
|
|
|
|
|
|
|
|
$rootNode
|
2011-09-09 20:02:47 +02:00
|
|
|
->addDefaultsIfNotSet()
|
2011-09-08 17:02:40 +02:00
|
|
|
->children()
|
2011-09-09 20:02:47 +02:00
|
|
|
->scalarNode('length')->defaultValue(5)->end()
|
|
|
|
->scalarNode('width')->defaultValue(120)->end()
|
|
|
|
->scalarNode('height')->defaultValue(40)->end()
|
2011-09-08 17:02:40 +02:00
|
|
|
->end()
|
|
|
|
;
|
|
|
|
return $treeBuilder;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|