Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / vendor / symfony / dependency-injection / Tests / Fixtures / php / services9.php
1 <?php
2
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;
10
11 /**
12  * This class has been auto-generated
13  * by the Symfony Dependency Injection Component.
14  *
15  * @final since Symfony 3.3
16  */
17 class ProjectServiceContainer extends Container
18 {
19     private $parameters;
20     private $targetDirs = array();
21
22     public function __construct()
23     {
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',
28         );
29         $this->syntheticIds = array(
30             'request' => true,
31         );
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',
59         );
60         $this->privates = array(
61             'configurator_service' => true,
62             'configurator_service_simple' => true,
63             'factory_simple' => true,
64             'inlined' => true,
65             'new_factory' => true,
66             'tagged_iterator_foo' => true,
67         );
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',
73         );
74     }
75
76     /**
77      * Gets the public 'bar' shared service.
78      *
79      * @return \Bar\FooClass
80      */
81     protected function getBarService()
82     {
83         $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
84
85         $this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
86
87         $a->configure($instance);
88
89         return $instance;
90     }
91
92     /**
93      * Gets the public 'baz' shared service.
94      *
95      * @return \Baz
96      */
97     protected function getBazService()
98     {
99         $this->services['baz'] = $instance = new \Baz();
100
101         $instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->getFooWithInlineService()) && false ?: '_'});
102
103         return $instance;
104     }
105
106     /**
107      * Gets the public 'configured_service' shared service.
108      *
109      * @return \stdClass
110      */
111     protected function getConfiguredServiceService()
112     {
113         $this->services['configured_service'] = $instance = new \stdClass();
114
115         ${($_ = isset($this->services['configurator_service']) ? $this->services['configurator_service'] : $this->getConfiguratorServiceService()) && false ?: '_'}->configureStdClass($instance);
116
117         return $instance;
118     }
119
120     /**
121      * Gets the public 'configured_service_simple' shared service.
122      *
123      * @return \stdClass
124      */
125     protected function getConfiguredServiceSimpleService()
126     {
127         $this->services['configured_service_simple'] = $instance = new \stdClass();
128
129         ${($_ = isset($this->services['configurator_service_simple']) ? $this->services['configurator_service_simple'] : $this->services['configurator_service_simple'] = new \ConfClass('bar')) && false ?: '_'}->configureStdClass($instance);
130
131         return $instance;
132     }
133
134     /**
135      * Gets the public 'decorated' shared service.
136      *
137      * @return \stdClass
138      */
139     protected function getDecoratedService()
140     {
141         return $this->services['decorated'] = new \stdClass();
142     }
143
144     /**
145      * Gets the public 'decorator_service' shared service.
146      *
147      * @return \stdClass
148      */
149     protected function getDecoratorServiceService()
150     {
151         return $this->services['decorator_service'] = new \stdClass();
152     }
153
154     /**
155      * Gets the public 'decorator_service_with_name' shared service.
156      *
157      * @return \stdClass
158      */
159     protected function getDecoratorServiceWithNameService()
160     {
161         return $this->services['decorator_service_with_name'] = new \stdClass();
162     }
163
164     /**
165      * Gets the public 'deprecated_service' shared service.
166      *
167      * @return \stdClass
168      *
169      * @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.
170      */
171     protected function getDeprecatedServiceService()
172     {
173         @trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
174
175         return $this->services['deprecated_service'] = new \stdClass();
176     }
177
178     /**
179      * Gets the public 'factory_service' shared service.
180      *
181      * @return \Bar
182      */
183     protected function getFactoryServiceService()
184     {
185         return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'}->getInstance();
186     }
187
188     /**
189      * Gets the public 'factory_service_simple' shared service.
190      *
191      * @return \Bar
192      */
193     protected function getFactoryServiceSimpleService()
194     {
195         return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->getFactorySimpleService()) && false ?: '_'}->getInstance();
196     }
197
198     /**
199      * Gets the public 'foo' shared service.
200      *
201      * @return \Bar\FooClass
202      */
203     protected function getFooService()
204     {
205         $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
206
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);
208
209         $instance->foo = 'bar';
210         $instance->moo = $a;
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);
215
216         return $instance;
217     }
218
219     /**
220      * Gets the public 'foo.baz' shared service.
221      *
222      * @return object A %baz_class% instance
223      */
224     protected function getFoo_BazService()
225     {
226         $this->services['foo.baz'] = $instance = \call_user_func(array($this->getParameter('baz_class'), 'getInstance'));
227
228         \call_user_func(array($this->getParameter('baz_class'), 'configureStatic1'), $instance);
229
230         return $instance;
231     }
232
233     /**
234      * Gets the public 'foo_bar' service.
235      *
236      * @return object A %foo_class% instance
237      */
238     protected function getFooBarService()
239     {
240         $class = $this->getParameter('foo_class');
241
242         return new $class(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->getDeprecatedServiceService()) && false ?: '_'});
243     }
244
245     /**
246      * Gets the public 'foo_with_inline' shared service.
247      *
248      * @return \Foo
249      */
250     protected function getFooWithInlineService()
251     {
252         $this->services['foo_with_inline'] = $instance = new \Foo();
253
254         $instance->setBar(${($_ = isset($this->services['inlined']) ? $this->services['inlined'] : $this->getInlinedService()) && false ?: '_'});
255
256         return $instance;
257     }
258
259     /**
260      * Gets the public 'lazy_context' shared service.
261      *
262      * @return \LazyContext
263      */
264     protected function getLazyContextService()
265     {
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 ?: '_'};
268             yield 'k2' => $this;
269         }, 2), new RewindableGenerator(function () {
270             return new \EmptyIterator();
271         }, 0));
272     }
273
274     /**
275      * Gets the public 'lazy_context_ignore_invalid_ref' shared service.
276      *
277      * @return \LazyContext
278      */
279     protected function getLazyContextIgnoreInvalidRefService()
280     {
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 ?: '_'};
285             }
286         }, function () {
287             return 1 + (int) ($this->has('invalid'));
288         }), new RewindableGenerator(function () {
289             return new \EmptyIterator();
290         }, 0));
291     }
292
293     /**
294      * Gets the public 'method_call1' shared service.
295      *
296      * @return \Bar\FooClass
297      */
298     protected function getMethodCall1Service()
299     {
300         include_once '%path%foo.php';
301
302         $this->services['method_call1'] = $instance = new \Bar\FooClass();
303
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 ?: '_'});
308         }
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 ?: '_'});
311         }
312         $instance->setBar((${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'}->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
313
314         return $instance;
315     }
316
317     /**
318      * Gets the public 'new_factory_service' shared service.
319      *
320      * @return \FooBarBaz
321      */
322     protected function getNewFactoryServiceService()
323     {
324         $this->services['new_factory_service'] = $instance = ${($_ = isset($this->services['new_factory']) ? $this->services['new_factory'] : $this->getNewFactoryService()) && false ?: '_'}->getInstance();
325
326         $instance->foo = 'bar';
327
328         return $instance;
329     }
330
331     /**
332      * Gets the public 'service_from_static_method' shared service.
333      *
334      * @return \Bar\FooClass
335      */
336     protected function getServiceFromStaticMethodService()
337     {
338         return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance();
339     }
340
341     /**
342      * Gets the public 'tagged_iterator' shared service.
343      *
344      * @return \Bar
345      */
346     protected function getTaggedIteratorService()
347     {
348         return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () {
349             return new \EmptyIterator();
350         }, 0));
351     }
352
353     /**
354      * Gets the private 'configurator_service' shared service.
355      *
356      * @return \ConfClass
357      */
358     protected function getConfiguratorServiceService()
359     {
360         $this->services['configurator_service'] = $instance = new \ConfClass();
361
362         $instance->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
363
364         return $instance;
365     }
366
367     /**
368      * Gets the private 'configurator_service_simple' shared service.
369      *
370      * @return \ConfClass
371      */
372     protected function getConfiguratorServiceSimpleService()
373     {
374         return $this->services['configurator_service_simple'] = new \ConfClass('bar');
375     }
376
377     /**
378      * Gets the private 'factory_simple' shared service.
379      *
380      * @return \SimpleFactoryClass
381      *
382      * @deprecated The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.
383      */
384     protected function getFactorySimpleService()
385     {
386         @trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
387
388         return $this->services['factory_simple'] = new \SimpleFactoryClass('foo');
389     }
390
391     /**
392      * Gets the private 'inlined' shared service.
393      *
394      * @return \Bar
395      */
396     protected function getInlinedService()
397     {
398         $this->services['inlined'] = $instance = new \Bar();
399
400         $instance->pub = 'pub';
401         $instance->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
402
403         return $instance;
404     }
405
406     /**
407      * Gets the private 'new_factory' shared service.
408      *
409      * @return \FactoryClass
410      */
411     protected function getNewFactoryService()
412     {
413         $this->services['new_factory'] = $instance = new \FactoryClass();
414
415         $instance->foo = 'bar';
416
417         return $instance;
418     }
419
420     /**
421      * Gets the private 'tagged_iterator_foo' shared service.
422      *
423      * @return \Bar
424      */
425     protected function getTaggedIteratorFooService()
426     {
427         return $this->services['tagged_iterator_foo'] = new \Bar();
428     }
429
430     /**
431      * Gets the default parameters.
432      *
433      * @return array An array of the default parameters
434      */
435     protected function getDefaultParameters()
436     {
437         return array(
438             'baz_class' => 'BazClass',
439             'foo_class' => 'Bar\\FooClass',
440             'foo' => 'bar',
441         );
442     }
443 }