3 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
4 use Symfony\Component\DependencyInjection\ContainerInterface;
5 use Symfony\Component\DependencyInjection\Container;
6 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
7 use Symfony\Component\DependencyInjection\Exception\LogicException;
8 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
9 use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
12 * This class has been auto-generated
13 * by the Symfony Dependency Injection Component.
15 * @final since Symfony 3.3
17 class ProjectServiceContainer extends Container
20 private $targetDirs = array();
22 public function __construct()
24 parent::__construct(new ParameterBag($this->getDefaultParameters()));
25 $this->normalizedIds = array(
26 'psr\\container\\containerinterface' => 'Psr\\Container\\ContainerInterface',
27 'symfony\\component\\dependencyinjection\\containerinterface' => 'Symfony\\Component\\DependencyInjection\\ContainerInterface',
29 $this->syntheticIds = array(
32 $this->methodMap = array(
33 'bar' => 'getBarService',
34 'baz' => 'getBazService',
35 'configurator_service' => 'getConfiguratorServiceService',
36 'configurator_service_simple' => 'getConfiguratorServiceSimpleService',
37 'configured_service' => 'getConfiguredServiceService',
38 'configured_service_simple' => 'getConfiguredServiceSimpleService',
39 'decorated' => 'getDecoratedService',
40 'decorator_service' => 'getDecoratorServiceService',
41 'decorator_service_with_name' => 'getDecoratorServiceWithNameService',
42 'deprecated_service' => 'getDeprecatedServiceService',
43 'factory_service' => 'getFactoryServiceService',
44 'factory_service_simple' => 'getFactoryServiceSimpleService',
45 'factory_simple' => 'getFactorySimpleService',
46 'foo' => 'getFooService',
47 'foo.baz' => 'getFoo_BazService',
48 'foo_bar' => 'getFooBarService',
49 'foo_with_inline' => 'getFooWithInlineService',
50 'inlined' => 'getInlinedService',
51 'lazy_context' => 'getLazyContextService',
52 'lazy_context_ignore_invalid_ref' => 'getLazyContextIgnoreInvalidRefService',
53 'method_call1' => 'getMethodCall1Service',
54 'new_factory' => 'getNewFactoryService',
55 'new_factory_service' => 'getNewFactoryServiceService',
56 'service_from_static_method' => 'getServiceFromStaticMethodService',
57 'tagged_iterator' => 'getTaggedIteratorService',
58 'tagged_iterator_foo' => 'getTaggedIteratorFooService',
60 $this->privates = array(
61 'configurator_service' => true,
62 'configurator_service_simple' => true,
63 'factory_simple' => true,
65 'new_factory' => true,
66 'tagged_iterator_foo' => true,
68 $this->aliases = array(
69 'Psr\\Container\\ContainerInterface' => 'service_container',
70 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => 'service_container',
71 'alias_for_alias' => 'foo',
72 'alias_for_foo' => 'foo',
77 * Gets the public 'bar' shared service.
79 * @return \Bar\FooClass
81 protected function getBarService()
83 $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
85 $this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
87 $a->configure($instance);
93 * Gets the public 'baz' shared service.
97 protected function getBazService()
99 $this->services['baz'] = $instance = new \Baz();
101 $instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->getFooWithInlineService()) && false ?: '_'});
107 * Gets the public 'configured_service' shared service.
111 protected function getConfiguredServiceService()
113 $this->services['configured_service'] = $instance = new \stdClass();
115 ${($_ = isset($this->services['configurator_service']) ? $this->services['configurator_service'] : $this->getConfiguratorServiceService()) && false ?: '_'}->configureStdClass($instance);
121 * Gets the public 'configured_service_simple' shared service.
125 protected function getConfiguredServiceSimpleService()
127 $this->services['configured_service_simple'] = $instance = new \stdClass();
129 ${($_ = isset($this->services['configurator_service_simple']) ? $this->services['configurator_service_simple'] : $this->services['configurator_service_simple'] = new \ConfClass('bar')) && false ?: '_'}->configureStdClass($instance);
135 * Gets the public 'decorated' shared service.
139 protected function getDecoratedService()
141 return $this->services['decorated'] = new \stdClass();
145 * Gets the public 'decorator_service' shared service.
149 protected function getDecoratorServiceService()
151 return $this->services['decorator_service'] = new \stdClass();
155 * Gets the public 'decorator_service_with_name' shared service.
159 protected function getDecoratorServiceWithNameService()
161 return $this->services['decorator_service_with_name'] = new \stdClass();
165 * Gets the public 'deprecated_service' shared service.
169 * @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.
171 protected function getDeprecatedServiceService()
173 @trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
175 return $this->services['deprecated_service'] = new \stdClass();
179 * Gets the public 'factory_service' shared service.
183 protected function getFactoryServiceService()
185 return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'}->getInstance();
189 * Gets the public 'factory_service_simple' shared service.
193 protected function getFactoryServiceSimpleService()
195 return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->getFactorySimpleService()) && false ?: '_'}->getInstance();
199 * Gets the public 'foo' shared service.
201 * @return \Bar\FooClass
203 protected function getFooService()
205 $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
207 $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo')), true, $this);
209 $instance->foo = 'bar';
211 $instance->qux = array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo'));
212 $instance->setBar(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'});
213 $instance->initialize();
214 sc_configure($instance);
220 * Gets the public 'foo.baz' shared service.
222 * @return object A %baz_class% instance
224 protected function getFoo_BazService()
226 $this->services['foo.baz'] = $instance = \call_user_func(array($this->getParameter('baz_class'), 'getInstance'));
228 \call_user_func(array($this->getParameter('baz_class'), 'configureStatic1'), $instance);
234 * Gets the public 'foo_bar' service.
236 * @return object A %foo_class% instance
238 protected function getFooBarService()
240 $class = $this->getParameter('foo_class');
242 return new $class(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->getDeprecatedServiceService()) && false ?: '_'});
246 * Gets the public 'foo_with_inline' shared service.
250 protected function getFooWithInlineService()
252 $this->services['foo_with_inline'] = $instance = new \Foo();
254 $instance->setBar(${($_ = isset($this->services['inlined']) ? $this->services['inlined'] : $this->getInlinedService()) && false ?: '_'});
260 * Gets the public 'lazy_context' shared service.
262 * @return \LazyContext
264 protected function getLazyContextService()
266 return $this->services['lazy_context'] = new \LazyContext(new RewindableGenerator(function () {
267 yield 'k1' => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
269 }, 2), new RewindableGenerator(function () {
270 return new \EmptyIterator();
275 * Gets the public 'lazy_context_ignore_invalid_ref' shared service.
277 * @return \LazyContext
279 protected function getLazyContextIgnoreInvalidRefService()
281 return $this->services['lazy_context_ignore_invalid_ref'] = new \LazyContext(new RewindableGenerator(function () {
282 yield 0 => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
283 if ($this->has('invalid')) {
284 yield 1 => ${($_ = isset($this->services['invalid']) ? $this->services['invalid'] : $this->get('invalid', /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ 2)) && false ?: '_'};
287 return 1 + (int) ($this->has('invalid'));
288 }), new RewindableGenerator(function () {
289 return new \EmptyIterator();
294 * Gets the public 'method_call1' shared service.
296 * @return \Bar\FooClass
298 protected function getMethodCall1Service()
300 include_once '%path%foo.php';
302 $this->services['method_call1'] = $instance = new \Bar\FooClass();
304 $instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'});
305 $instance->setBar(${($_ = isset($this->services['foo2']) ? $this->services['foo2'] : $this->get('foo2', /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ 2)) && false ?: '_'});
306 if ($this->has('foo3')) {
307 $instance->setBar(${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : $this->get('foo3', /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ 2)) && false ?: '_'});
309 if ($this->has('foobaz')) {
310 $instance->setBar(${($_ = isset($this->services['foobaz']) ? $this->services['foobaz'] : $this->get('foobaz', /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ 2)) && false ?: '_'});
312 $instance->setBar((${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'}->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
318 * Gets the public 'new_factory_service' shared service.
322 protected function getNewFactoryServiceService()
324 $this->services['new_factory_service'] = $instance = ${($_ = isset($this->services['new_factory']) ? $this->services['new_factory'] : $this->getNewFactoryService()) && false ?: '_'}->getInstance();
326 $instance->foo = 'bar';
332 * Gets the public 'service_from_static_method' shared service.
334 * @return \Bar\FooClass
336 protected function getServiceFromStaticMethodService()
338 return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance();
342 * Gets the public 'tagged_iterator' shared service.
346 protected function getTaggedIteratorService()
348 return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () {
349 return new \EmptyIterator();
354 * Gets the private 'configurator_service' shared service.
358 protected function getConfiguratorServiceService()
360 $this->services['configurator_service'] = $instance = new \ConfClass();
362 $instance->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
368 * Gets the private 'configurator_service_simple' shared service.
372 protected function getConfiguratorServiceSimpleService()
374 return $this->services['configurator_service_simple'] = new \ConfClass('bar');
378 * Gets the private 'factory_simple' shared service.
380 * @return \SimpleFactoryClass
382 * @deprecated The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.
384 protected function getFactorySimpleService()
386 @trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
388 return $this->services['factory_simple'] = new \SimpleFactoryClass('foo');
392 * Gets the private 'inlined' shared service.
396 protected function getInlinedService()
398 $this->services['inlined'] = $instance = new \Bar();
400 $instance->pub = 'pub';
401 $instance->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
407 * Gets the private 'new_factory' shared service.
409 * @return \FactoryClass
411 protected function getNewFactoryService()
413 $this->services['new_factory'] = $instance = new \FactoryClass();
415 $instance->foo = 'bar';
421 * Gets the private 'tagged_iterator_foo' shared service.
425 protected function getTaggedIteratorFooService()
427 return $this->services['tagged_iterator_foo'] = new \Bar();
431 * Gets the default parameters.
433 * @return array An array of the default parameters
435 protected function getDefaultParameters()
438 'baz_class' => 'BazClass',
439 'foo_class' => 'Bar\\FooClass',