1 | <?php |
||
20 | abstract class AbstractEncryptionSource implements Source |
||
21 | { |
||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | public function getNodeDefinition(NodeDefinition $node) |
||
26 | { |
||
27 | $node |
||
28 | ->children() |
||
29 | ->arrayNode($this->name()) |
||
30 | ->useAttributeAsKey('name') |
||
31 | ->arrayPrototype() |
||
32 | ->children() |
||
33 | ->booleanNode('is_public') |
||
34 | ->info('If true, the service will be public, else private.') |
||
35 | ->defaultTrue() |
||
36 | ->end() |
||
37 | ->arrayNode('key_encryption_algorithms') |
||
38 | ->info('A list of supported key encryption algorithms.') |
||
39 | ->useAttributeAsKey('name') |
||
40 | ->isRequired() |
||
41 | ->requiresAtLeastOneElement() |
||
42 | ->scalarPrototype()->end() |
||
43 | ->end() |
||
44 | ->arrayNode('content_encryption_algorithms') |
||
45 | ->info('A list of supported content encryption algorithms.') |
||
46 | ->useAttributeAsKey('name') |
||
47 | ->isRequired() |
||
48 | ->requiresAtLeastOneElement() |
||
49 | ->scalarPrototype()->end() |
||
50 | ->end() |
||
51 | ->arrayNode('compression_methods') |
||
52 | ->info('A list of supported compression methods.') |
||
53 | ->useAttributeAsKey('name') |
||
54 | ->defaultValue(['DEF']) |
||
55 | ->requiresAtLeastOneElement() |
||
56 | ->scalarPrototype()->end() |
||
57 | ->end() |
||
58 | ->arrayNode('tags') |
||
59 | ->info('A list of tags to be associated to the service.') |
||
60 | ->useAttributeAsKey('name') |
||
61 | ->treatNullLike([]) |
||
62 | ->treatFalseLike([]) |
||
63 | ->prototype('variable')->end() |
||
64 | ->end() |
||
65 | ->end() |
||
66 | ->end() |
||
67 | ->end() |
||
68 | ->end(); |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | public function prepend(ContainerBuilder $container, array $config): array |
||
78 | } |
||
79 |