services9_as_files.txt 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. Array
  2. (
  3. [Container%s/removed-ids.php] => <?php
  4. return array(
  5. 'Psr\\Container\\ContainerInterface' => true,
  6. 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
  7. 'configurator_service' => true,
  8. 'configurator_service_simple' => true,
  9. 'decorated.pif-pouf' => true,
  10. 'decorator_service.inner' => true,
  11. 'factory_simple' => true,
  12. 'inlined' => true,
  13. 'new_factory' => true,
  14. 'tagged_iterator_foo' => true,
  15. );
  16. [Container%s/getBazService.php] => <?php
  17. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  18. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  19. // Returns the public 'baz' shared service.
  20. $this->services['baz'] = $instance = new \Baz();
  21. $instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->load('getFooWithInlineService.php')) && false ?: '_'});
  22. return $instance;
  23. [Container%s/getConfiguredServiceService.php] => <?php
  24. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  25. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  26. // Returns the public 'configured_service' shared service.
  27. $this->services['configured_service'] = $instance = new \stdClass();
  28. $a = new \ConfClass();
  29. $a->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->load('getBazService.php')) && false ?: '_'});
  30. $a->configureStdClass($instance);
  31. return $instance;
  32. [Container%s/getConfiguredServiceSimpleService.php] => <?php
  33. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  34. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  35. // Returns the public 'configured_service_simple' shared service.
  36. $this->services['configured_service_simple'] = $instance = new \stdClass();
  37. (new \ConfClass('bar'))->configureStdClass($instance);
  38. return $instance;
  39. [Container%s/getDecoratorServiceService.php] => <?php
  40. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  41. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  42. // Returns the public 'decorator_service' shared service.
  43. return $this->services['decorator_service'] = new \stdClass();
  44. [Container%s/getDecoratorServiceWithNameService.php] => <?php
  45. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  46. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  47. // Returns the public 'decorator_service_with_name' shared service.
  48. return $this->services['decorator_service_with_name'] = new \stdClass();
  49. [Container%s/getDeprecatedServiceService.php] => <?php
  50. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  51. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  52. // Returns the public 'deprecated_service' shared service.
  53. @trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
  54. return $this->services['deprecated_service'] = new \stdClass();
  55. [Container%s/getFactoryServiceService.php] => <?php
  56. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  57. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  58. // Returns the public 'factory_service' shared service.
  59. return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'}->getInstance();
  60. [Container%s/getFactoryServiceSimpleService.php] => <?php
  61. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  62. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  63. // Returns the public 'factory_service_simple' shared service.
  64. return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->load('getFactorySimpleService.php')) && false ?: '_'}->getInstance();
  65. [Container%s/getFactorySimpleService.php] => <?php
  66. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  67. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  68. // Returns the private 'factory_simple' shared service.
  69. @trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
  70. return $this->services['factory_simple'] = new \SimpleFactoryClass('foo');
  71. [Container%s/getFooService.php] => <?php
  72. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  73. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  74. // Returns the public 'foo' shared service.
  75. $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
  76. $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this);
  77. $instance->foo = 'bar';
  78. $instance->moo = $a;
  79. $instance->qux = array('bar' => 'foo is bar', 'foobar' => 'bar');
  80. $instance->setBar(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'});
  81. $instance->initialize();
  82. sc_configure($instance);
  83. return $instance;
  84. [Container%s/getFoo_BazService.php] => <?php
  85. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  86. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  87. // Returns the public 'foo.baz' shared service.
  88. $this->services['foo.baz'] = $instance = \BazClass::getInstance();
  89. \BazClass::configureStatic1($instance);
  90. return $instance;
  91. [Container%s/getFooWithInlineService.php] => <?php
  92. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  93. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  94. // Returns the public 'foo_with_inline' shared service.
  95. $this->services['foo_with_inline'] = $instance = new \Foo();
  96. $a = new \Bar();
  97. $a->pub = 'pub';
  98. $a->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->load('getBazService.php')) && false ?: '_'});
  99. $instance->setBar($a);
  100. return $instance;
  101. [Container%s/getLazyContextService.php] => <?php
  102. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  103. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  104. // Returns the public 'lazy_context' shared service.
  105. return $this->services['lazy_context'] = new \LazyContext(new RewindableGenerator(function () {
  106. yield 'k1' => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
  107. yield 'k2' => $this;
  108. }, 2), new RewindableGenerator(function () {
  109. return new \EmptyIterator();
  110. }, 0));
  111. [Container%s/getLazyContextIgnoreInvalidRefService.php] => <?php
  112. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  113. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  114. // Returns the public 'lazy_context_ignore_invalid_ref' shared service.
  115. return $this->services['lazy_context_ignore_invalid_ref'] = new \LazyContext(new RewindableGenerator(function () {
  116. yield 0 => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
  117. }, 1), new RewindableGenerator(function () {
  118. return new \EmptyIterator();
  119. }, 0));
  120. [Container%s/getMethodCall1Service.php] => <?php
  121. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  122. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  123. // Returns the public 'method_call1' shared service.
  124. include_once ($this->targetDirs[0].'/Fixtures/includes/foo.php');
  125. $this->services['method_call1'] = $instance = new \Bar\FooClass();
  126. $instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load('getFooService.php')) && false ?: '_'});
  127. $instance->setBar(NULL);
  128. $instance->setBar((${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load('getFooService.php')) && false ?: '_'}->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
  129. return $instance;
  130. [Container%s/getNewFactoryServiceService.php] => <?php
  131. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  132. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  133. // Returns the public 'new_factory_service' shared service.
  134. $a = new \FactoryClass();
  135. $a->foo = 'bar';
  136. $this->services['new_factory_service'] = $instance = $a->getInstance();
  137. $instance->foo = 'bar';
  138. return $instance;
  139. [Container%s/getServiceFromStaticMethodService.php] => <?php
  140. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  141. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  142. // Returns the public 'service_from_static_method' shared service.
  143. return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance();
  144. [Container%s/getTaggedIteratorService.php] => <?php
  145. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  146. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  147. // Returns the public 'tagged_iterator' shared service.
  148. return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () {
  149. yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load('getFooService.php')) && false ?: '_'};
  150. yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : $this->services['tagged_iterator_foo'] = new \Bar()) && false ?: '_'};
  151. }, 2));
  152. [Container%s/getTaggedIteratorFooService.php] => <?php
  153. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  154. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  155. // Returns the private 'tagged_iterator_foo' shared service.
  156. return $this->services['tagged_iterator_foo'] = new \Bar();
  157. [Container%s/ProjectServiceContainer.php] => <?php
  158. namespace Container%s;
  159. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  160. use Symfony\Component\DependencyInjection\ContainerInterface;
  161. use Symfony\Component\DependencyInjection\Container;
  162. use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
  163. use Symfony\Component\DependencyInjection\Exception\LogicException;
  164. use Symfony\Component\DependencyInjection\Exception\RuntimeException;
  165. use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
  166. /**
  167. * This class has been auto-generated
  168. * by the Symfony Dependency Injection Component.
  169. *
  170. * @final since Symfony 3.3
  171. */
  172. class ProjectServiceContainer extends Container
  173. {
  174. private $buildParameters;
  175. private $containerDir;
  176. private $parameters;
  177. private $targetDirs = array();
  178. public function __construct(array $buildParameters = array(), $containerDir = __DIR__)
  179. {
  180. $dir = $this->targetDirs[0] = \dirname($containerDir);
  181. for ($i = 1; $i <= 5; ++$i) {
  182. $this->targetDirs[$i] = $dir = \dirname($dir);
  183. }
  184. $this->buildParameters = $buildParameters;
  185. $this->containerDir = $containerDir;
  186. $this->parameters = $this->getDefaultParameters();
  187. $this->services = array();
  188. $this->syntheticIds = array(
  189. 'request' => true,
  190. );
  191. $this->methodMap = array(
  192. 'bar' => 'getBarService',
  193. 'foo_bar' => 'getFooBarService',
  194. );
  195. $this->fileMap = array(
  196. 'baz' => 'getBazService.php',
  197. 'configured_service' => 'getConfiguredServiceService.php',
  198. 'configured_service_simple' => 'getConfiguredServiceSimpleService.php',
  199. 'decorator_service' => 'getDecoratorServiceService.php',
  200. 'decorator_service_with_name' => 'getDecoratorServiceWithNameService.php',
  201. 'deprecated_service' => 'getDeprecatedServiceService.php',
  202. 'factory_service' => 'getFactoryServiceService.php',
  203. 'factory_service_simple' => 'getFactoryServiceSimpleService.php',
  204. 'factory_simple' => 'getFactorySimpleService.php',
  205. 'foo' => 'getFooService.php',
  206. 'foo.baz' => 'getFoo_BazService.php',
  207. 'foo_with_inline' => 'getFooWithInlineService.php',
  208. 'lazy_context' => 'getLazyContextService.php',
  209. 'lazy_context_ignore_invalid_ref' => 'getLazyContextIgnoreInvalidRefService.php',
  210. 'method_call1' => 'getMethodCall1Service.php',
  211. 'new_factory_service' => 'getNewFactoryServiceService.php',
  212. 'service_from_static_method' => 'getServiceFromStaticMethodService.php',
  213. 'tagged_iterator' => 'getTaggedIteratorService.php',
  214. 'tagged_iterator_foo' => 'getTaggedIteratorFooService.php',
  215. );
  216. $this->privates = array(
  217. 'factory_simple' => true,
  218. 'tagged_iterator_foo' => true,
  219. );
  220. $this->aliases = array(
  221. 'alias_for_alias' => 'foo',
  222. 'alias_for_foo' => 'foo',
  223. 'decorated' => 'decorator_service_with_name',
  224. );
  225. }
  226. public function getRemovedIds()
  227. {
  228. return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php';
  229. }
  230. public function compile()
  231. {
  232. throw new LogicException('You cannot compile a dumped container that was already compiled.');
  233. }
  234. public function isCompiled()
  235. {
  236. return true;
  237. }
  238. public function isFrozen()
  239. {
  240. @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);
  241. return true;
  242. }
  243. protected function load($file, $lazyLoad = true)
  244. {
  245. return require $this->containerDir.\DIRECTORY_SEPARATOR.$file;
  246. }
  247. /**
  248. * Gets the public 'bar' shared service.
  249. *
  250. * @return \Bar\FooClass
  251. */
  252. protected function getBarService()
  253. {
  254. $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
  255. $this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
  256. $a->configure($instance);
  257. return $instance;
  258. }
  259. /**
  260. * Gets the public 'foo_bar' service.
  261. *
  262. * @return \Bar\FooClass
  263. */
  264. protected function getFooBarService()
  265. {
  266. return new \Bar\FooClass(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->load('getDeprecatedServiceService.php')) && false ?: '_'});
  267. }
  268. public function getParameter($name)
  269. {
  270. $name = (string) $name;
  271. if (isset($this->buildParameters[$name])) {
  272. return $this->buildParameters[$name];
  273. }
  274. if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
  275. $name = $this->normalizeParameterName($name);
  276. if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
  277. throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
  278. }
  279. }
  280. if (isset($this->loadedDynamicParameters[$name])) {
  281. return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
  282. }
  283. return $this->parameters[$name];
  284. }
  285. public function hasParameter($name)
  286. {
  287. $name = (string) $name;
  288. if (isset($this->buildParameters[$name])) {
  289. return true;
  290. }
  291. $name = $this->normalizeParameterName($name);
  292. return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
  293. }
  294. public function setParameter($name, $value)
  295. {
  296. throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
  297. }
  298. public function getParameterBag()
  299. {
  300. if (null === $this->parameterBag) {
  301. $parameters = $this->parameters;
  302. foreach ($this->loadedDynamicParameters as $name => $loaded) {
  303. $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
  304. }
  305. foreach ($this->buildParameters as $name => $value) {
  306. $parameters[$name] = $value;
  307. }
  308. $this->parameterBag = new FrozenParameterBag($parameters);
  309. }
  310. return $this->parameterBag;
  311. }
  312. private $loadedDynamicParameters = array();
  313. private $dynamicParameters = array();
  314. /**
  315. * Computes a dynamic parameter.
  316. *
  317. * @param string The name of the dynamic parameter to load
  318. *
  319. * @return mixed The value of the dynamic parameter
  320. *
  321. * @throws InvalidArgumentException When the dynamic parameter does not exist
  322. */
  323. private function getDynamicParameter($name)
  324. {
  325. throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
  326. }
  327. private $normalizedParameterNames = array();
  328. private function normalizeParameterName($name)
  329. {
  330. if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
  331. $normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
  332. if ((string) $name !== $normalizedName) {
  333. @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);
  334. }
  335. } else {
  336. $normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
  337. }
  338. return $normalizedName;
  339. }
  340. /**
  341. * Gets the default parameters.
  342. *
  343. * @return array An array of the default parameters
  344. */
  345. protected function getDefaultParameters()
  346. {
  347. return array(
  348. 'baz_class' => 'BazClass',
  349. 'foo_class' => 'Bar\\FooClass',
  350. 'foo' => 'bar',
  351. );
  352. }
  353. }
  354. [ProjectServiceContainer.php] => <?php
  355. // This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
  356. if (\class_exists(\Container%s\ProjectServiceContainer::class, false)) {
  357. // no-op
  358. } elseif (!include __DIR__.'/Container%s/ProjectServiceContainer.php') {
  359. touch(__DIR__.'/Container%s.legacy');
  360. return;
  361. }
  362. if (!\class_exists(ProjectServiceContainer::class, false)) {
  363. \class_alias(\Container%s\ProjectServiceContainer::class, ProjectServiceContainer::class, false);
  364. }
  365. return new \Container%s\ProjectServiceContainer(array(
  366. 'container.build_hash' => '%s',
  367. 'container.build_id' => '%s',
  368. 'container.build_time' => %d,
  369. ), __DIR__.\DIRECTORY_SEPARATOR.'Container%s');
  370. )