Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
40 $this->bag = $container->getParameterBag(); | 40 $this->bag = $container->getParameterBag(); |
41 | 41 |
42 try { | 42 try { |
43 parent::process($container); | 43 parent::process($container); |
44 | 44 |
45 $aliases = array(); | 45 $aliases = []; |
46 foreach ($container->getAliases() as $name => $target) { | 46 foreach ($container->getAliases() as $name => $target) { |
47 $this->currentId = $name; | 47 $this->currentId = $name; |
48 $aliases[$this->bag->resolveValue($name)] = $target; | 48 $aliases[$this->bag->resolveValue($name)] = $target; |
49 } | 49 } |
50 $container->setAliases($aliases); | 50 $container->setAliases($aliases); |
58 $this->bag = null; | 58 $this->bag = null; |
59 } | 59 } |
60 | 60 |
61 protected function processValue($value, $isRoot = false) | 61 protected function processValue($value, $isRoot = false) |
62 { | 62 { |
63 if (is_string($value)) { | 63 if (\is_string($value)) { |
64 $v = $this->bag->resolveValue($value); | 64 $v = $this->bag->resolveValue($value); |
65 | 65 |
66 return $this->resolveArrays || !$v || !is_array($v) ? $v : $value; | 66 return $this->resolveArrays || !$v || !\is_array($v) ? $v : $value; |
67 } | 67 } |
68 if ($value instanceof Definition) { | 68 if ($value instanceof Definition) { |
69 $value->setBindings($this->processValue($value->getBindings())); | 69 $value->setBindings($this->processValue($value->getBindings())); |
70 $changes = $value->getChanges(); | 70 $changes = $value->getChanges(); |
71 if (isset($changes['class'])) { | 71 if (isset($changes['class'])) { |
76 } | 76 } |
77 } | 77 } |
78 | 78 |
79 $value = parent::processValue($value, $isRoot); | 79 $value = parent::processValue($value, $isRoot); |
80 | 80 |
81 if ($value && is_array($value)) { | 81 if ($value && \is_array($value)) { |
82 $value = array_combine($this->bag->resolveValue(array_keys($value)), $value); | 82 $value = array_combine($this->bag->resolveValue(array_keys($value)), $value); |
83 } | 83 } |
84 | 84 |
85 return $value; | 85 return $value; |
86 } | 86 } |