be18eb183abd00c608b65e7d4553eb0fb7e1c8d7
[yaffs-website] / vendor / symfony / dependency-injection / Tests / Fixtures / php / services_almost_circular_public.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_Almost_Circular_Public 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             'bar3' => 'getBar3Service',
28             'bar5' => 'getBar5Service',
29             'foo' => 'getFooService',
30             'foo2' => 'getFoo2Service',
31             'foo4' => 'getFoo4Service',
32             'foo5' => 'getFoo5Service',
33             'foobar' => 'getFoobarService',
34             'foobar2' => 'getFoobar2Service',
35             'foobar3' => 'getFoobar3Service',
36             'foobar4' => 'getFoobar4Service',
37         );
38
39         $this->aliases = array();
40     }
41
42     public function getRemovedIds()
43     {
44         return array(
45             'Psr\\Container\\ContainerInterface' => true,
46             'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
47             'bar2' => true,
48         );
49     }
50
51     public function compile()
52     {
53         throw new LogicException('You cannot compile a dumped container that was already compiled.');
54     }
55
56     public function isCompiled()
57     {
58         return true;
59     }
60
61     public function isFrozen()
62     {
63         @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);
64
65         return true;
66     }
67
68     /**
69      * Gets the public 'bar' shared service.
70      *
71      * @return \BarCircular
72      */
73     protected function getBarService()
74     {
75         $this->services['bar'] = $instance = new \BarCircular();
76
77         $instance->addFoobar(${($_ = isset($this->services['foobar']) ? $this->services['foobar'] : $this->getFoobarService()) && false ?: '_'});
78
79         return $instance;
80     }
81
82     /**
83      * Gets the public 'bar3' shared service.
84      *
85      * @return \BarCircular
86      */
87     protected function getBar3Service()
88     {
89         $this->services['bar3'] = $instance = new \BarCircular();
90
91         $a = ${($_ = isset($this->services['foobar3']) ? $this->services['foobar3'] : $this->services['foobar3'] = new \FoobarCircular()) && false ?: '_'};
92
93         $instance->addFoobar($a, $a);
94
95         return $instance;
96     }
97
98     /**
99      * Gets the public 'bar5' shared service.
100      *
101      * @return \stdClass
102      */
103     protected function getBar5Service()
104     {
105         $a = ${($_ = isset($this->services['foo5']) ? $this->services['foo5'] : $this->getFoo5Service()) && false ?: '_'};
106
107         if (isset($this->services['bar5'])) {
108             return $this->services['bar5'];
109         }
110
111         $this->services['bar5'] = $instance = new \stdClass($a);
112
113         $instance->foo = $a;
114
115         return $instance;
116     }
117
118     /**
119      * Gets the public 'foo' shared service.
120      *
121      * @return \FooCircular
122      */
123     protected function getFooService()
124     {
125         $a = ${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'};
126
127         if (isset($this->services['foo'])) {
128             return $this->services['foo'];
129         }
130
131         return $this->services['foo'] = new \FooCircular($a);
132     }
133
134     /**
135      * Gets the public 'foo2' shared service.
136      *
137      * @return \FooCircular
138      */
139     protected function getFoo2Service()
140     {
141         $a = new \BarCircular();
142
143         $this->services['foo2'] = $instance = new \FooCircular($a);
144
145         $a->addFoobar(${($_ = isset($this->services['foobar2']) ? $this->services['foobar2'] : $this->getFoobar2Service()) && false ?: '_'});
146
147         return $instance;
148     }
149
150     /**
151      * Gets the public 'foo4' service.
152      *
153      * @return \stdClass
154      */
155     protected function getFoo4Service()
156     {
157         $instance = new \stdClass();
158
159         $instance->foobar = ${($_ = isset($this->services['foobar4']) ? $this->services['foobar4'] : $this->getFoobar4Service()) && false ?: '_'};
160
161         return $instance;
162     }
163
164     /**
165      * Gets the public 'foo5' shared service.
166      *
167      * @return \stdClass
168      */
169     protected function getFoo5Service()
170     {
171         $this->services['foo5'] = $instance = new \stdClass();
172
173         $instance->bar = ${($_ = isset($this->services['bar5']) ? $this->services['bar5'] : $this->getBar5Service()) && false ?: '_'};
174
175         return $instance;
176     }
177
178     /**
179      * Gets the public 'foobar' shared service.
180      *
181      * @return \FoobarCircular
182      */
183     protected function getFoobarService()
184     {
185         $a = ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'};
186
187         if (isset($this->services['foobar'])) {
188             return $this->services['foobar'];
189         }
190
191         return $this->services['foobar'] = new \FoobarCircular($a);
192     }
193
194     /**
195      * Gets the public 'foobar2' shared service.
196      *
197      * @return \FoobarCircular
198      */
199     protected function getFoobar2Service()
200     {
201         $a = ${($_ = isset($this->services['foo2']) ? $this->services['foo2'] : $this->getFoo2Service()) && false ?: '_'};
202
203         if (isset($this->services['foobar2'])) {
204             return $this->services['foobar2'];
205         }
206
207         return $this->services['foobar2'] = new \FoobarCircular($a);
208     }
209
210     /**
211      * Gets the public 'foobar3' shared service.
212      *
213      * @return \FoobarCircular
214      */
215     protected function getFoobar3Service()
216     {
217         return $this->services['foobar3'] = new \FoobarCircular();
218     }
219
220     /**
221      * Gets the public 'foobar4' shared service.
222      *
223      * @return \stdClass
224      */
225     protected function getFoobar4Service()
226     {
227         $a = new \stdClass();
228
229         $this->services['foobar4'] = $instance = new \stdClass($a);
230
231         $a->foobar = $instance;
232
233         return $instance;
234     }
235 }