-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathConfiguration.php
36 lines (32 loc) · 918 Bytes
/
Configuration.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace NW\RequestLimitBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* Class Configuration
* @package NW\RequestLimitBundle\DependencyInjection
* @author Novikov Viktor
*/
class Configuration implements ConfigurationInterface
{
/**
* {@inheritdoc}
*
* @return TreeBuilder
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('request_limit');
$rootNode
->children()
->integerNode('restriction_time')->end()
->scalarNode('provider_type')->end()
->arrayNode('provider_configuration')
->prototype('scalar')
->end()
->end()
;
return $treeBuilder;
}
}