2012-10-06 23:35:20 +00:00
|
|
|
<?php
|
|
|
|
namespace GergelyPolonkai\SmsSenderBundle\DependencyInjection;
|
|
|
|
|
|
|
|
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
|
|
|
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Description of Configuration
|
|
|
|
*
|
|
|
|
* @author Gergely Polonkai
|
|
|
|
*/
|
|
|
|
class Configuration implements ConfigurationInterface
|
|
|
|
{
|
|
|
|
public function getConfigTreeBuilder()
|
|
|
|
{
|
|
|
|
$treeBuilder = new TreeBuilder();
|
|
|
|
$rootNode = $treeBuilder->root('gergely_polonkai_sms_sender');
|
|
|
|
|
|
|
|
$rootNode
|
|
|
|
->children()
|
|
|
|
->booleanNode('verify_ssl')
|
|
|
|
->defaultTrue()
|
|
|
|
->end()
|
|
|
|
->scalarNode('sender_url')
|
|
|
|
->isRequired()
|
|
|
|
->end()
|
|
|
|
->scalarNode('content_type')
|
|
|
|
->defaultValue('application/json')
|
|
|
|
->end()
|
|
|
|
->scalarNode('content_encoding')
|
|
|
|
->defaultValue('utf-8')
|
|
|
|
->end()
|
|
|
|
->booleanNode('verbose_curl')
|
|
|
|
->defaultFalse()
|
|
|
|
->end()
|
2012-12-26 14:07:44 +00:00
|
|
|
->scalarNode('sms_account_id')
|
|
|
|
->defaultFalse()
|
|
|
|
->end()
|
2012-10-06 23:35:20 +00:00
|
|
|
->scalarNode('username')
|
|
|
|
->isRequired()
|
|
|
|
->end()
|
|
|
|
->scalarNode('password')
|
|
|
|
->isRequired()
|
|
|
|
->end()
|
2012-12-26 14:07:44 +00:00
|
|
|
->scalarNode('from')
|
|
|
|
->isRequired()
|
|
|
|
->end()
|
2012-10-06 23:35:20 +00:00
|
|
|
->end();
|
|
|
|
|
|
|
|
return $treeBuilder;
|
|
|
|
}
|
|
|
|
}
|