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;
12 * This class has been auto-generated
13 * by the Symfony Dependency Injection Component.
15 * @final since Symfony 3.3
17 class ProjectServiceContainer extends Container
20 private $targetDirs = array();
22 public function __construct()
25 for ($i = 1; $i <= 5; ++$i) {
26 $this->targetDirs[$i] = $dir = \dirname($dir);
28 $this->parameters = $this->getDefaultParameters();
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',
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',
43 $this->privates = array(
44 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => true,
47 $this->aliases = array();
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';
57 public function getRemovedIds()
60 'Psr\\Container\\ContainerInterface' => true,
61 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
62 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => true,
66 public function compile()
68 throw new LogicException('You cannot compile a dumped container that was already compiled.');
71 public function isCompiled()
76 public function isFrozen()
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);
84 * Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists' shared service.
86 * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists
88 protected function getParentNotExistsService()
90 return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists();
94 * Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1' shared service.
96 * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1
98 protected function getC1Service()
100 return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1();
104 * Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2' shared service.
106 * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2
108 protected function getC2Service()
110 include_once $this->targetDirs[1].'/includes/HotPath/C2.php';
111 include_once $this->targetDirs[1].'/includes/HotPath/C3.php';
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 ?: '_'});
117 * Gets the private 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3' shared service.
119 * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3
121 protected function getC3Service()
123 include_once $this->targetDirs[1].'/includes/HotPath/C3.php';
125 return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3();
128 public function getParameter($name)
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);
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));
138 if (isset($this->loadedDynamicParameters[$name])) {
139 return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
142 return $this->parameters[$name];
145 public function hasParameter($name)
147 $name = (string) $name;
148 $name = $this->normalizeParameterName($name);
150 return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
153 public function setParameter($name, $value)
155 throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
158 public function getParameterBag()
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);
165 $this->parameterBag = new FrozenParameterBag($parameters);
168 return $this->parameterBag;
171 private $loadedDynamicParameters = array();
172 private $dynamicParameters = array();
175 * Computes a dynamic parameter.
177 * @param string The name of the dynamic parameter to load
179 * @return mixed The value of the dynamic parameter
181 * @throws InvalidArgumentException When the dynamic parameter does not exist
183 private function getDynamicParameter($name)
185 throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
188 private $normalizedParameterNames = array();
190 private function normalizeParameterName($name)
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);
198 $normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
201 return $normalizedName;
205 * Gets the default parameters.
207 * @return array An array of the default parameters
209 protected function getDefaultParameters()
212 'inline_requires' => true,