comparison vendor/symfony/dependency-injection/Container.php @ 18:af1871eacc83

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:33:08 +0100
parents 129ea1e6d783
children
comparison
equal deleted inserted replaced
17:129ea1e6d783 18:af1871eacc83
157 } 157 }
158 158
159 /** 159 /**
160 * Sets a service. 160 * Sets a service.
161 * 161 *
162 * Setting a service to null resets the service: has() returns false and get() 162 * Setting a synthetic service to null resets it: has() returns false and get()
163 * behaves in the same way as if the service was never created. 163 * behaves in the same way as if the service was never created.
164 * 164 *
165 * @param string $id The service identifier 165 * @param string $id The service identifier
166 * @param object $service The service instance 166 * @param object $service The service instance
167 */ 167 */
464 protected function getEnv($name) 464 protected function getEnv($name)
465 { 465 {
466 if (isset($this->resolving[$envName = "env($name)"])) { 466 if (isset($this->resolving[$envName = "env($name)"])) {
467 throw new ParameterCircularReferenceException(array_keys($this->resolving)); 467 throw new ParameterCircularReferenceException(array_keys($this->resolving));
468 } 468 }
469 if (isset($this->envCache[$name]) || array_key_exists($name, $this->envCache)) { 469 if (isset($this->envCache[$name]) || \array_key_exists($name, $this->envCache)) {
470 return $this->envCache[$name]; 470 return $this->envCache[$name];
471 } 471 }
472 if (!$this->has($id = 'container.env_var_processors_locator')) { 472 if (!$this->has($id = 'container.env_var_processors_locator')) {
473 $this->set($id, new ServiceLocator([])); 473 $this->set($id, new ServiceLocator([]));
474 } 474 }