1 | <?php |
||
9 | use Symfony\Component\DependencyInjection\Reference; |
||
10 | |||
11 | class CacheEncrypterCompilerPass implements CompilerPassInterface |
||
12 | { |
||
13 | 9 | public function process(ContainerBuilder $container) |
|
28 | |||
29 | 12 | private function buildDecoratorDefinition($decorated, array $tags) |
|
37 | |||
38 | 12 | private function buildPasswordDecoratorDefinition($decorated, array $tags) |
|
52 | |||
53 | 9 | private function buildPkiDecoratorDefinition($decorated, array $tag) |
|
64 | |||
65 | 12 | private function arrayHasKeys(array $array, array $keys) |
|
75 | |||
76 | private function inflateServicesInTag(array &$config) |
||
77 | { |
||
78 | 15 | array_walk($config, function (&$value) { |
|
79 | 15 | if (is_array($value)) { |
|
80 | 15 | $this->inflateServicesInTag($value); |
|
81 | 15 | } |
|
82 | |||
83 | 15 | if (is_string($value) && 0 === strpos($value, '@')) { |
|
84 | // this is either a service reference or a string meant to |
||
85 | // start with an '@' symbol. In any case, lop off the first '@' |
||
86 | 15 | $value = substr($value, 1); |
|
87 | 15 | if (0 !== strpos($value, '@')) { |
|
88 | // this is a service reference, not a string literal |
||
89 | 12 | $value = new Reference($value); |
|
90 | 12 | } |
|
91 | 15 | } |
|
92 | 15 | }); |
|
93 | 15 | } |
|
95 |