Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.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 |
---|---|
26 protected $definition; | 26 protected $definition; |
27 | 27 |
28 public function __call($method, $args) | 28 public function __call($method, $args) |
29 { | 29 { |
30 if (method_exists($this, 'set'.$method)) { | 30 if (method_exists($this, 'set'.$method)) { |
31 return call_user_func_array(array($this, 'set'.$method), $args); | 31 return \call_user_func_array([$this, 'set'.$method], $args); |
32 } | 32 } |
33 | 33 |
34 throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', get_class($this), $method)); | 34 throw new \BadMethodCallException(sprintf('Call to undefined method %s::%s()', \get_class($this), $method)); |
35 } | 35 } |
36 | 36 |
37 /** | 37 /** |
38 * Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value. | 38 * Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value. |
39 * | 39 * |
42 * | 42 * |
43 * @return mixed the value, optionally cast to a Definition/Reference | 43 * @return mixed the value, optionally cast to a Definition/Reference |
44 */ | 44 */ |
45 public static function processValue($value, $allowServices = false) | 45 public static function processValue($value, $allowServices = false) |
46 { | 46 { |
47 if (is_array($value)) { | 47 if (\is_array($value)) { |
48 foreach ($value as $k => $v) { | 48 foreach ($value as $k => $v) { |
49 $value[$k] = static::processValue($v, $allowServices); | 49 $value[$k] = static::processValue($v, $allowServices); |
50 } | 50 } |
51 | 51 |
52 return $value; | 52 return $value; |
80 if ($allowServices) { | 80 if ($allowServices) { |
81 return $value; | 81 return $value; |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 throw new InvalidArgumentException(sprintf('Cannot use values of type "%s" in service configuration files.', is_object($value) ? get_class($value) : gettype($value))); | 85 throw new InvalidArgumentException(sprintf('Cannot use values of type "%s" in service configuration files.', \is_object($value) ? \get_class($value) : \gettype($value))); |
86 } | 86 } |
87 } | 87 } |