3 [Container%s/removed-ids.php] => <?php
6 'Psr\\Container\\ContainerInterface' => true,
7 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
8 'configurator_service' => true,
9 'configurator_service_simple' => true,
10 'decorated.pif-pouf' => true,
11 'decorator_service.inner' => true,
12 'factory_simple' => true,
14 'new_factory' => true,
15 'tagged_iterator_foo' => true,
18 [Container%s/getBazService.php] => <?php
20 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
22 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
23 // Returns the public 'baz' shared service.
25 $this->services['baz'] = $instance = new \Baz();
27 $instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->load('getFooWithInlineService.php')) && false ?: '_'});
31 [Container%s/getConfiguredServiceService.php] => <?php
33 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
35 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
36 // Returns the public 'configured_service' shared service.
38 $this->services['configured_service'] = $instance = new \stdClass();
40 $a = new \ConfClass();
41 $a->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->load('getBazService.php')) && false ?: '_'});
43 $a->configureStdClass($instance);
47 [Container%s/getConfiguredServiceSimpleService.php] => <?php
49 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
51 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
52 // Returns the public 'configured_service_simple' shared service.
54 $this->services['configured_service_simple'] = $instance = new \stdClass();
56 (new \ConfClass('bar'))->configureStdClass($instance);
60 [Container%s/getDecoratorServiceService.php] => <?php
62 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
64 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
65 // Returns the public 'decorator_service' shared service.
67 return $this->services['decorator_service'] = new \stdClass();
69 [Container%s/getDecoratorServiceWithNameService.php] => <?php
71 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
73 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
74 // Returns the public 'decorator_service_with_name' shared service.
76 return $this->services['decorator_service_with_name'] = new \stdClass();
78 [Container%s/getDeprecatedServiceService.php] => <?php
80 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
82 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
83 // Returns the public 'deprecated_service' shared service.
85 @trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
87 return $this->services['deprecated_service'] = new \stdClass();
89 [Container%s/getFactoryServiceService.php] => <?php
91 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
93 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
94 // Returns the public 'factory_service' shared service.
96 return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'}->getInstance();
98 [Container%s/getFactoryServiceSimpleService.php] => <?php
100 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
102 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
103 // Returns the public 'factory_service_simple' shared service.
105 return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->load('getFactorySimpleService.php')) && false ?: '_'}->getInstance();
107 [Container%s/getFactorySimpleService.php] => <?php
109 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
111 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
112 // Returns the private 'factory_simple' shared service.
114 @trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
116 return $this->services['factory_simple'] = new \SimpleFactoryClass('foo');
118 [Container%s/getFooService.php] => <?php
120 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
122 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
123 // Returns the public 'foo' shared service.
125 $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
127 $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this);
129 $instance->foo = 'bar';
131 $instance->qux = array('bar' => 'foo is bar', 'foobar' => 'bar');
132 $instance->setBar(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'});
133 $instance->initialize();
134 sc_configure($instance);
138 [Container%s/getFoo_BazService.php] => <?php
140 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
142 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
143 // Returns the public 'foo.baz' shared service.
145 $this->services['foo.baz'] = $instance = \BazClass::getInstance();
147 \BazClass::configureStatic1($instance);
151 [Container%s/getFooWithInlineService.php] => <?php
153 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
155 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
156 // Returns the public 'foo_with_inline' shared service.
158 $this->services['foo_with_inline'] = $instance = new \Foo();
163 $a->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->load('getBazService.php')) && false ?: '_'});
165 $instance->setBar($a);
169 [Container%s/getLazyContextService.php] => <?php
171 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
173 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
174 // Returns the public 'lazy_context' shared service.
176 return $this->services['lazy_context'] = new \LazyContext(new RewindableGenerator(function () {
177 yield 'k1' => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
179 }, 2), new RewindableGenerator(function () {
180 return new \EmptyIterator();
183 [Container%s/getLazyContextIgnoreInvalidRefService.php] => <?php
185 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
187 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
188 // Returns the public 'lazy_context_ignore_invalid_ref' shared service.
190 return $this->services['lazy_context_ignore_invalid_ref'] = new \LazyContext(new RewindableGenerator(function () {
191 yield 0 => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
192 }, 1), new RewindableGenerator(function () {
193 return new \EmptyIterator();
196 [Container%s/getMethodCall1Service.php] => <?php
198 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
200 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
201 // Returns the public 'method_call1' shared service.
203 include_once ($this->targetDirs[0].'/Fixtures/includes/foo.php');
205 $this->services['method_call1'] = $instance = new \Bar\FooClass();
207 $instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load('getFooService.php')) && false ?: '_'});
208 $instance->setBar(NULL);
209 $instance->setBar((${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load('getFooService.php')) && false ?: '_'}->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
213 [Container%s/getNewFactoryServiceService.php] => <?php
215 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
217 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
218 // Returns the public 'new_factory_service' shared service.
220 $a = new \FactoryClass();
223 $this->services['new_factory_service'] = $instance = $a->getInstance();
225 $instance->foo = 'bar';
229 [Container%s/getServiceFromStaticMethodService.php] => <?php
231 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
233 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
234 // Returns the public 'service_from_static_method' shared service.
236 return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance();
238 [Container%s/getTaggedIteratorService.php] => <?php
240 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
242 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
243 // Returns the public 'tagged_iterator' shared service.
245 return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () {
246 yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load('getFooService.php')) && false ?: '_'};
247 yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : $this->services['tagged_iterator_foo'] = new \Bar()) && false ?: '_'};
250 [Container%s/getTaggedIteratorFooService.php] => <?php
252 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
254 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
255 // Returns the private 'tagged_iterator_foo' shared service.
257 return $this->services['tagged_iterator_foo'] = new \Bar();
259 [Container%s/ProjectServiceContainer.php] => <?php
261 namespace Container%s;
263 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
264 use Symfony\Component\DependencyInjection\ContainerInterface;
265 use Symfony\Component\DependencyInjection\Container;
266 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
267 use Symfony\Component\DependencyInjection\Exception\LogicException;
268 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
269 use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
272 * This class has been auto-generated
273 * by the Symfony Dependency Injection Component.
275 * @final since Symfony 3.3
277 class ProjectServiceContainer extends Container
279 private $buildParameters;
280 private $containerDir;
282 private $targetDirs = array();
284 public function __construct(array $buildParameters = array(), $containerDir = __DIR__)
286 $dir = $this->targetDirs[0] = \dirname($containerDir);
287 for ($i = 1; $i <= 5; ++$i) {
288 $this->targetDirs[$i] = $dir = \dirname($dir);
290 $this->buildParameters = $buildParameters;
291 $this->containerDir = $containerDir;
292 $this->parameters = $this->getDefaultParameters();
294 $this->services = array();
295 $this->syntheticIds = array(
298 $this->methodMap = array(
299 'bar' => 'getBarService',
300 'foo_bar' => 'getFooBarService',
302 $this->fileMap = array(
303 'baz' => 'getBazService.php',
304 'configured_service' => 'getConfiguredServiceService.php',
305 'configured_service_simple' => 'getConfiguredServiceSimpleService.php',
306 'decorator_service' => 'getDecoratorServiceService.php',
307 'decorator_service_with_name' => 'getDecoratorServiceWithNameService.php',
308 'deprecated_service' => 'getDeprecatedServiceService.php',
309 'factory_service' => 'getFactoryServiceService.php',
310 'factory_service_simple' => 'getFactoryServiceSimpleService.php',
311 'factory_simple' => 'getFactorySimpleService.php',
312 'foo' => 'getFooService.php',
313 'foo.baz' => 'getFoo_BazService.php',
314 'foo_with_inline' => 'getFooWithInlineService.php',
315 'lazy_context' => 'getLazyContextService.php',
316 'lazy_context_ignore_invalid_ref' => 'getLazyContextIgnoreInvalidRefService.php',
317 'method_call1' => 'getMethodCall1Service.php',
318 'new_factory_service' => 'getNewFactoryServiceService.php',
319 'service_from_static_method' => 'getServiceFromStaticMethodService.php',
320 'tagged_iterator' => 'getTaggedIteratorService.php',
321 'tagged_iterator_foo' => 'getTaggedIteratorFooService.php',
323 $this->privates = array(
324 'factory_simple' => true,
325 'tagged_iterator_foo' => true,
327 $this->aliases = array(
328 'alias_for_alias' => 'foo',
329 'alias_for_foo' => 'foo',
330 'decorated' => 'decorator_service_with_name',
334 public function getRemovedIds()
336 return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php';
339 public function compile()
341 throw new LogicException('You cannot compile a dumped container that was already compiled.');
344 public function isCompiled()
349 public function isFrozen()
351 @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
356 protected function load($file, $lazyLoad = true)
358 return require $this->containerDir.\DIRECTORY_SEPARATOR.$file;
362 * Gets the public 'bar' shared service.
364 * @return \Bar\FooClass
366 protected function getBarService()
368 $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
370 $this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
372 $a->configure($instance);
378 * Gets the public 'foo_bar' service.
380 * @return \Bar\FooClass
382 protected function getFooBarService()
384 return new \Bar\FooClass(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->load('getDeprecatedServiceService.php')) && false ?: '_'});
387 public function getParameter($name)
389 $name = (string) $name;
390 if (isset($this->buildParameters[$name])) {
391 return $this->buildParameters[$name];
393 if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
394 $name = $this->normalizeParameterName($name);
396 if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
397 throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
400 if (isset($this->loadedDynamicParameters[$name])) {
401 return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
404 return $this->parameters[$name];
407 public function hasParameter($name)
409 $name = (string) $name;
410 if (isset($this->buildParameters[$name])) {
413 $name = $this->normalizeParameterName($name);
415 return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
418 public function setParameter($name, $value)
420 throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
423 public function getParameterBag()
425 if (null === $this->parameterBag) {
426 $parameters = $this->parameters;
427 foreach ($this->loadedDynamicParameters as $name => $loaded) {
428 $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
430 foreach ($this->buildParameters as $name => $value) {
431 $parameters[$name] = $value;
433 $this->parameterBag = new FrozenParameterBag($parameters);
436 return $this->parameterBag;
439 private $loadedDynamicParameters = array();
440 private $dynamicParameters = array();
443 * Computes a dynamic parameter.
445 * @param string The name of the dynamic parameter to load
447 * @return mixed The value of the dynamic parameter
449 * @throws InvalidArgumentException When the dynamic parameter does not exist
451 private function getDynamicParameter($name)
453 throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
456 private $normalizedParameterNames = array();
458 private function normalizeParameterName($name)
460 if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
461 $normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
462 if ((string) $name !== $normalizedName) {
463 @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
466 $normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
469 return $normalizedName;
473 * Gets the default parameters.
475 * @return array An array of the default parameters
477 protected function getDefaultParameters()
480 'baz_class' => 'BazClass',
481 'foo_class' => 'Bar\\FooClass',
487 [ProjectServiceContainer.php] => <?php
489 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
491 if (\class_exists(\Container%s\ProjectServiceContainer::class, false)) {
493 } elseif (!include __DIR__.'/Container%s/ProjectServiceContainer.php') {
494 touch(__DIR__.'/Container%s.legacy');
499 if (!\class_exists(ProjectServiceContainer::class, false)) {
500 \class_alias(\Container%s\ProjectServiceContainer::class, ProjectServiceContainer::class, false);
503 return new \Container%s\ProjectServiceContainer(array(
504 'container.build_hash' => '%s',
505 'container.build_id' => '%s',
506 'container.build_time' => %d,
507 ), __DIR__.\DIRECTORY_SEPARATOR.'Container%s');