Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.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 |
---|---|
36 { | 36 { |
37 $this->defaults = new Definition(); | 37 $this->defaults = new Definition(); |
38 $this->container = $container; | 38 $this->container = $container; |
39 $this->loader = $loader; | 39 $this->loader = $loader; |
40 $this->instanceof = &$instanceof; | 40 $this->instanceof = &$instanceof; |
41 $instanceof = array(); | 41 $instanceof = []; |
42 } | 42 } |
43 | 43 |
44 /** | 44 /** |
45 * Defines a set of defaults for following service definitions. | 45 * Defines a set of defaults for following service definitions. |
46 * | 46 * |
81 $definition = new Definition(); | 81 $definition = new Definition(); |
82 $definition->setPublic($defaults->isPublic()); | 82 $definition->setPublic($defaults->isPublic()); |
83 $definition->setAutowired($defaults->isAutowired()); | 83 $definition->setAutowired($defaults->isAutowired()); |
84 $definition->setAutoconfigured($defaults->isAutoconfigured()); | 84 $definition->setAutoconfigured($defaults->isAutoconfigured()); |
85 $definition->setBindings($defaults->getBindings()); | 85 $definition->setBindings($defaults->getBindings()); |
86 $definition->setChanges(array()); | 86 $definition->setChanges([]); |
87 | 87 |
88 $configurator = new ServiceConfigurator($this->container, $this->instanceof, $allowParent, $this, $definition, $id, $defaults->getTags()); | 88 $configurator = new ServiceConfigurator($this->container, $this->instanceof, $allowParent, $this, $definition, $id, $defaults->getTags()); |
89 | 89 |
90 return null !== $class ? $configurator->class($class) : $configurator; | 90 return null !== $class ? $configurator->class($class) : $configurator; |
91 } | 91 } |
134 final public function get($id) | 134 final public function get($id) |
135 { | 135 { |
136 $allowParent = !$this->defaults->getChanges() && empty($this->instanceof); | 136 $allowParent = !$this->defaults->getChanges() && empty($this->instanceof); |
137 $definition = $this->container->getDefinition($id); | 137 $definition = $this->container->getDefinition($id); |
138 | 138 |
139 return new ServiceConfigurator($this->container, $definition->getInstanceofConditionals(), $allowParent, $this, $definition, $id, array()); | 139 return new ServiceConfigurator($this->container, $definition->getInstanceofConditionals(), $allowParent, $this, $definition, $id, []); |
140 } | 140 } |
141 | 141 |
142 /** | 142 /** |
143 * Registers a service. | 143 * Registers a service. |
144 * | 144 * |