4d0c00b2891387d7f212268a4d5663a52f3207aa
[yaffs-website] / vendor / symfony / dependency-injection / Tests / Fixtures / php / services_uninitialized_ref.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\FrozenParameterBag;
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 Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends Container
18 {
19     private $parameters;
20     private $targetDirs = array();
21
22     public function __construct()
23     {
24         $this->services = array();
25         $this->methodMap = array(
26             'bar' => 'getBarService',
27             'baz' => 'getBazService',
28             'foo1' => 'getFoo1Service',
29             'foo3' => 'getFoo3Service',
30         );
31         $this->privates = array(
32             'foo3' => true,
33         );
34
35         $this->aliases = array();
36     }
37
38     public function getRemovedIds()
39     {
40         return array(
41             'Psr\\Container\\ContainerInterface' => true,
42             'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
43             'foo2' => true,
44             'foo3' => true,
45         );
46     }
47
48     public function compile()
49     {
50         throw new LogicException('You cannot compile a dumped container that was already compiled.');
51     }
52
53     public function isCompiled()
54     {
55         return true;
56     }
57
58     public function isFrozen()
59     {
60         @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);
61
62         return true;
63     }
64
65     /**
66      * Gets the public 'bar' shared service.
67      *
68      * @return \stdClass
69      */
70     protected function getBarService()
71     {
72         $this->services['bar'] = $instance = new \stdClass();
73
74         $instance->foo1 = ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'};
75         $instance->foo2 = null;
76         $instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && false ?: '_'};
77         $instance->closures = array(0 => function () {
78             return ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'};
79         }, 1 => function () {
80             return null;
81         }, 2 => function () {
82             return ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && false ?: '_'};
83         });
84         $instance->iter = new RewindableGenerator(function () {
85             if (isset($this->services['foo1'])) {
86                 yield 'foo1' => ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'};
87             }
88             if (false) {
89                 yield 'foo2' => null;
90             }
91             if (isset($this->services['foo3'])) {
92                 yield 'foo3' => ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && false ?: '_'};
93             }
94         }, function () {
95             return 0 + (int) (isset($this->services['foo1'])) + (int) (false) + (int) (isset($this->services['foo3']));
96         });
97
98         return $instance;
99     }
100
101     /**
102      * Gets the public 'baz' shared service.
103      *
104      * @return \stdClass
105      */
106     protected function getBazService()
107     {
108         $this->services['baz'] = $instance = new \stdClass();
109
110         $instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : $this->services['foo3'] = new \stdClass()) && false ?: '_'};
111
112         return $instance;
113     }
114
115     /**
116      * Gets the public 'foo1' shared service.
117      *
118      * @return \stdClass
119      */
120     protected function getFoo1Service()
121     {
122         return $this->services['foo1'] = new \stdClass();
123     }
124
125     /**
126      * Gets the private 'foo3' shared service.
127      *
128      * @return \stdClass
129      */
130     protected function getFoo3Service()
131     {
132         return $this->services['foo3'] = new \stdClass();
133     }
134 }