Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / vendor / symfony / dependency-injection / Tests / Fixtures / php / services_inline_requires.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 ProjectServiceContainer extends Container
18 {
19     private $parameters;
20     private $targetDirs = array();
21
22     public function __construct()
23     {
24         $dir = __DIR__;
25         for ($i = 1; $i <= 5; ++$i) {
26             $this->targetDirs[$i] = $dir = \dirname($dir);
27         }
28         $this->parameters = $this->getDefaultParameters();
29
30         $this->services = array();
31         $this->normalizedIds = array(
32             'symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c1' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C1',
33             'symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c2' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C2',
34             'symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c3' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3',
35             'symfony\\component\\dependencyinjection\\tests\\fixtures\\parentnotexists' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\ParentNotExists',
36         );
37         $this->methodMap = array(
38             'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\ParentNotExists' => 'getParentNotExistsService',
39             'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C1' => 'getC1Service',
40             'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C2' => 'getC2Service',
41             'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => 'getC3Service',
42         );
43         $this->privates = array(
44             'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => true,
45         );
46
47         $this->aliases = array();
48
49         $this->privates['service_container'] = function () {
50             include_once $this->targetDirs[1].'/includes/HotPath/I1.php';
51             include_once $this->targetDirs[1].'/includes/HotPath/P1.php';
52             include_once $this->targetDirs[1].'/includes/HotPath/T1.php';
53             include_once $this->targetDirs[1].'/includes/HotPath/C1.php';
54         };
55     }
56
57     public function getRemovedIds()
58     {
59         return array(
60             'Psr\\Container\\ContainerInterface' => true,
61             'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
62             'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => true,
63         );
64     }
65
66     public function compile()
67     {
68         throw new LogicException('You cannot compile a dumped container that was already compiled.');
69     }
70
71     public function isCompiled()
72     {
73         return true;
74     }
75
76     public function isFrozen()
77     {
78         @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);
79
80         return true;
81     }
82
83     /**
84      * Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists' shared service.
85      *
86      * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists
87      */
88     protected function getParentNotExistsService()
89     {
90         return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists();
91     }
92
93     /**
94      * Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1' shared service.
95      *
96      * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1
97      */
98     protected function getC1Service()
99     {
100         return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1();
101     }
102
103     /**
104      * Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2' shared service.
105      *
106      * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2
107      */
108     protected function getC2Service()
109     {
110         include_once $this->targetDirs[1].'/includes/HotPath/C2.php';
111         include_once $this->targetDirs[1].'/includes/HotPath/C3.php';
112
113         return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3()) && false ?: '_'});
114     }
115
116     /**
117      * Gets the private 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3' shared service.
118      *
119      * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3
120      */
121     protected function getC3Service()
122     {
123         include_once $this->targetDirs[1].'/includes/HotPath/C3.php';
124
125         return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3();
126     }
127
128     public function getParameter($name)
129     {
130         $name = (string) $name;
131         if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
132             $name = $this->normalizeParameterName($name);
133
134             if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
135                 throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
136             }
137         }
138         if (isset($this->loadedDynamicParameters[$name])) {
139             return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
140         }
141
142         return $this->parameters[$name];
143     }
144
145     public function hasParameter($name)
146     {
147         $name = (string) $name;
148         $name = $this->normalizeParameterName($name);
149
150         return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
151     }
152
153     public function setParameter($name, $value)
154     {
155         throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
156     }
157
158     public function getParameterBag()
159     {
160         if (null === $this->parameterBag) {
161             $parameters = $this->parameters;
162             foreach ($this->loadedDynamicParameters as $name => $loaded) {
163                 $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
164             }
165             $this->parameterBag = new FrozenParameterBag($parameters);
166         }
167
168         return $this->parameterBag;
169     }
170
171     private $loadedDynamicParameters = array();
172     private $dynamicParameters = array();
173
174     /**
175      * Computes a dynamic parameter.
176      *
177      * @param string The name of the dynamic parameter to load
178      *
179      * @return mixed The value of the dynamic parameter
180      *
181      * @throws InvalidArgumentException When the dynamic parameter does not exist
182      */
183     private function getDynamicParameter($name)
184     {
185         throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
186     }
187
188     private $normalizedParameterNames = array();
189
190     private function normalizeParameterName($name)
191     {
192         if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
193             $normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
194             if ((string) $name !== $normalizedName) {
195                 @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);
196             }
197         } else {
198             $normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
199         }
200
201         return $normalizedName;
202     }
203
204     /**
205      * Gets the default parameters.
206      *
207      * @return array An array of the default parameters
208      */
209     protected function getDefaultParameters()
210     {
211         return array(
212             'inline_requires' => true,
213         );
214     }
215 }