Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / dependency-injection / Tests / Fixtures / php / services9_as_files.txt
1 Array
2 (
3     [Container%s/removed-ids.php] => <?php
4
5 return array(
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,
13     'inlined' => true,
14     'new_factory' => true,
15     'tagged_iterator_foo' => true,
16 );
17
18     [Container%s/getBazService.php] => <?php
19
20 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
21
22 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
23 // Returns the public 'baz' shared service.
24
25 $this->services['baz'] = $instance = new \Baz();
26
27 $instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->load('getFooWithInlineService.php')) && false ?: '_'});
28
29 return $instance;
30
31     [Container%s/getConfiguredServiceService.php] => <?php
32
33 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
34
35 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
36 // Returns the public 'configured_service' shared service.
37
38 $this->services['configured_service'] = $instance = new \stdClass();
39
40 $a = new \ConfClass();
41 $a->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->load('getBazService.php')) && false ?: '_'});
42
43 $a->configureStdClass($instance);
44
45 return $instance;
46
47     [Container%s/getConfiguredServiceSimpleService.php] => <?php
48
49 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
50
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.
53
54 $this->services['configured_service_simple'] = $instance = new \stdClass();
55
56 (new \ConfClass('bar'))->configureStdClass($instance);
57
58 return $instance;
59
60     [Container%s/getDecoratorServiceService.php] => <?php
61
62 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
63
64 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
65 // Returns the public 'decorator_service' shared service.
66
67 return $this->services['decorator_service'] = new \stdClass();
68
69     [Container%s/getDecoratorServiceWithNameService.php] => <?php
70
71 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
72
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.
75
76 return $this->services['decorator_service_with_name'] = new \stdClass();
77
78     [Container%s/getDeprecatedServiceService.php] => <?php
79
80 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
81
82 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
83 // Returns the public 'deprecated_service' shared service.
84
85 @trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
86
87 return $this->services['deprecated_service'] = new \stdClass();
88
89     [Container%s/getFactoryServiceService.php] => <?php
90
91 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
92
93 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
94 // Returns the public 'factory_service' shared service.
95
96 return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'}->getInstance();
97
98     [Container%s/getFactoryServiceSimpleService.php] => <?php
99
100 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
101
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.
104
105 return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->load('getFactorySimpleService.php')) && false ?: '_'}->getInstance();
106
107     [Container%s/getFactorySimpleService.php] => <?php
108
109 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
110
111 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
112 // Returns the private 'factory_simple' shared service.
113
114 @trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
115
116 return $this->services['factory_simple'] = new \SimpleFactoryClass('foo');
117
118     [Container%s/getFooService.php] => <?php
119
120 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
121
122 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
123 // Returns the public 'foo' shared service.
124
125 $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
126
127 $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this);
128
129 $instance->foo = 'bar';
130 $instance->moo = $a;
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);
135
136 return $instance;
137
138     [Container%s/getFoo_BazService.php] => <?php
139
140 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
141
142 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
143 // Returns the public 'foo.baz' shared service.
144
145 $this->services['foo.baz'] = $instance = \BazClass::getInstance();
146
147 \BazClass::configureStatic1($instance);
148
149 return $instance;
150
151     [Container%s/getFooWithInlineService.php] => <?php
152
153 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
154
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.
157
158 $this->services['foo_with_inline'] = $instance = new \Foo();
159
160 $a = new \Bar();
161
162 $a->pub = 'pub';
163 $a->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->load('getBazService.php')) && false ?: '_'});
164
165 $instance->setBar($a);
166
167 return $instance;
168
169     [Container%s/getLazyContextService.php] => <?php
170
171 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
172
173 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
174 // Returns the public 'lazy_context' shared service.
175
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 ?: '_'};
178     yield 'k2' => $this;
179 }, 2), new RewindableGenerator(function () {
180     return new \EmptyIterator();
181 }, 0));
182
183     [Container%s/getLazyContextIgnoreInvalidRefService.php] => <?php
184
185 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
186
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.
189
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();
194 }, 0));
195
196     [Container%s/getMethodCall1Service.php] => <?php
197
198 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
199
200 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
201 // Returns the public 'method_call1' shared service.
202
203 include_once ($this->targetDirs[0].'/Fixtures/includes/foo.php');
204
205 $this->services['method_call1'] = $instance = new \Bar\FooClass();
206
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"))));
210
211 return $instance;
212
213     [Container%s/getNewFactoryServiceService.php] => <?php
214
215 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
216
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.
219
220 $a = new \FactoryClass();
221 $a->foo = 'bar';
222
223 $this->services['new_factory_service'] = $instance = $a->getInstance();
224
225 $instance->foo = 'bar';
226
227 return $instance;
228
229     [Container%s/getServiceFromStaticMethodService.php] => <?php
230
231 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
232
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.
235
236 return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance();
237
238     [Container%s/getTaggedIteratorService.php] => <?php
239
240 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
241
242 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
243 // Returns the public 'tagged_iterator' shared service.
244
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 ?: '_'};
248 }, 2));
249
250     [Container%s/getTaggedIteratorFooService.php] => <?php
251
252 use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
253
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.
256
257 return $this->services['tagged_iterator_foo'] = new \Bar();
258
259     [Container%s/ProjectServiceContainer.php] => <?php
260
261 namespace Container%s;
262
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;
270
271 /**
272  * This class has been auto-generated
273  * by the Symfony Dependency Injection Component.
274  *
275  * @final since Symfony 3.3
276  */
277 class ProjectServiceContainer extends Container
278 {
279     private $buildParameters;
280     private $containerDir;
281     private $parameters;
282     private $targetDirs = array();
283
284     public function __construct(array $buildParameters = array(), $containerDir = __DIR__)
285     {
286         $dir = $this->targetDirs[0] = \dirname($containerDir);
287         for ($i = 1; $i <= 5; ++$i) {
288             $this->targetDirs[$i] = $dir = \dirname($dir);
289         }
290         $this->buildParameters = $buildParameters;
291         $this->containerDir = $containerDir;
292         $this->parameters = $this->getDefaultParameters();
293
294         $this->services = array();
295         $this->syntheticIds = array(
296             'request' => true,
297         );
298         $this->methodMap = array(
299             'bar' => 'getBarService',
300             'foo_bar' => 'getFooBarService',
301         );
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',
322         );
323         $this->privates = array(
324             'factory_simple' => true,
325             'tagged_iterator_foo' => true,
326         );
327         $this->aliases = array(
328             'alias_for_alias' => 'foo',
329             'alias_for_foo' => 'foo',
330             'decorated' => 'decorator_service_with_name',
331         );
332     }
333
334     public function getRemovedIds()
335     {
336         return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php';
337     }
338
339     public function compile()
340     {
341         throw new LogicException('You cannot compile a dumped container that was already compiled.');
342     }
343
344     public function isCompiled()
345     {
346         return true;
347     }
348
349     public function isFrozen()
350     {
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);
352
353         return true;
354     }
355
356     protected function load($file, $lazyLoad = true)
357     {
358         return require $this->containerDir.\DIRECTORY_SEPARATOR.$file;
359     }
360
361     /**
362      * Gets the public 'bar' shared service.
363      *
364      * @return \Bar\FooClass
365      */
366     protected function getBarService()
367     {
368         $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
369
370         $this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
371
372         $a->configure($instance);
373
374         return $instance;
375     }
376
377     /**
378      * Gets the public 'foo_bar' service.
379      *
380      * @return \Bar\FooClass
381      */
382     protected function getFooBarService()
383     {
384         return new \Bar\FooClass(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->load('getDeprecatedServiceService.php')) && false ?: '_'});
385     }
386
387     public function getParameter($name)
388     {
389         $name = (string) $name;
390         if (isset($this->buildParameters[$name])) {
391             return $this->buildParameters[$name];
392         }
393         if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
394             $name = $this->normalizeParameterName($name);
395
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));
398             }
399         }
400         if (isset($this->loadedDynamicParameters[$name])) {
401             return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
402         }
403
404         return $this->parameters[$name];
405     }
406
407     public function hasParameter($name)
408     {
409         $name = (string) $name;
410         if (isset($this->buildParameters[$name])) {
411             return true;
412         }
413         $name = $this->normalizeParameterName($name);
414
415         return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
416     }
417
418     public function setParameter($name, $value)
419     {
420         throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
421     }
422
423     public function getParameterBag()
424     {
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);
429             }
430             foreach ($this->buildParameters as $name => $value) {
431                 $parameters[$name] = $value;
432             }
433             $this->parameterBag = new FrozenParameterBag($parameters);
434         }
435
436         return $this->parameterBag;
437     }
438
439     private $loadedDynamicParameters = array();
440     private $dynamicParameters = array();
441
442     /**
443      * Computes a dynamic parameter.
444      *
445      * @param string The name of the dynamic parameter to load
446      *
447      * @return mixed The value of the dynamic parameter
448      *
449      * @throws InvalidArgumentException When the dynamic parameter does not exist
450      */
451     private function getDynamicParameter($name)
452     {
453         throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
454     }
455
456     private $normalizedParameterNames = array();
457
458     private function normalizeParameterName($name)
459     {
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);
464             }
465         } else {
466             $normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
467         }
468
469         return $normalizedName;
470     }
471
472     /**
473      * Gets the default parameters.
474      *
475      * @return array An array of the default parameters
476      */
477     protected function getDefaultParameters()
478     {
479         return array(
480             'baz_class' => 'BazClass',
481             'foo_class' => 'Bar\\FooClass',
482             'foo' => 'bar',
483         );
484     }
485 }
486
487     [ProjectServiceContainer.php] => <?php
488
489 // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
490
491 if (\class_exists(\Container%s\ProjectServiceContainer::class, false)) {
492     // no-op
493 } elseif (!include __DIR__.'/Container%s/ProjectServiceContainer.php') {
494     touch(__DIR__.'/Container%s.legacy');
495
496     return;
497 }
498
499 if (!\class_exists(ProjectServiceContainer::class, false)) {
500     \class_alias(\Container%s\ProjectServiceContainer::class, ProjectServiceContainer::class, false);
501 }
502
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');
508
509 )