This repository has been archived by the owner on Feb 10, 2023. It is now read-only.
/
Configuration.php
60 lines (54 loc) · 2.1 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
declare(strict_types=1);
namespace lepiaf\SapientBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('sapient');
$rootNode
->children()
->arrayNode('sign')->canBeEnabled()
->children()
->scalarNode('private')->isRequired()->end()
->scalarNode('public')->isRequired()->end()
->scalarNode('name')->isRequired()->end()
->end()
->end()
->arrayNode('seal')->canBeEnabled()
->children()
->scalarNode('private')->isRequired()->end()
->scalarNode('public')->isRequired()->end()
->end()
->end()
->arrayNode('guzzle_middleware')->canBeEnabled()
->children()
->booleanNode('unseal')->defaultFalse()->end()
->booleanNode('verify')->defaultFalse()->end()
->scalarNode('requester_name')->defaultFalse()->end()
->end()
->end()
->arrayNode('sealing_public_keys')
->arrayPrototype()
->children()
->scalarNode('name')->end()
->scalarNode('key')->end()
->end()
->end()
->end()
->arrayNode('verifying_public_keys')
->arrayPrototype()
->children()
->scalarNode('name')->end()
->scalarNode('key')->end()
->end()
->end()
->end()
->end()
;
return $treeBuilder;
}
}