services9_compiled.php 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. <?php
  2. use Symfony\Component\DependencyInjection\ContainerInterface;
  3. use Symfony\Component\DependencyInjection\Container;
  4. use Symfony\Component\DependencyInjection\Exception\InactiveScopeException;
  5. use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
  6. use Symfony\Component\DependencyInjection\Exception\LogicException;
  7. use Symfony\Component\DependencyInjection\Exception\RuntimeException;
  8. use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
  9. /**
  10. * This class has been auto-generated
  11. * by the Symfony Dependency Injection Component.
  12. */
  13. class ProjectServiceContainer extends Container
  14. {
  15. private $parameters;
  16. private $targetDirs = array();
  17. public function __construct()
  18. {
  19. $this->parameters = $this->getDefaultParameters();
  20. $this->services =
  21. $this->scopedServices =
  22. $this->scopeStacks = array();
  23. $this->scopes = array();
  24. $this->scopeChildren = array();
  25. $this->methodMap = array(
  26. 'bar' => 'getBarService',
  27. 'baz' => 'getBazService',
  28. 'configured_service' => 'getConfiguredServiceService',
  29. 'decorator_service' => 'getDecoratorServiceService',
  30. 'decorator_service_with_name' => 'getDecoratorServiceWithNameService',
  31. 'deprecated_service' => 'getDeprecatedServiceService',
  32. 'factory_service' => 'getFactoryServiceService',
  33. 'foo' => 'getFooService',
  34. 'foo.baz' => 'getFoo_BazService',
  35. 'foo_bar' => 'getFooBarService',
  36. 'foo_with_inline' => 'getFooWithInlineService',
  37. 'method_call1' => 'getMethodCall1Service',
  38. 'new_factory_service' => 'getNewFactoryServiceService',
  39. 'request' => 'getRequestService',
  40. 'service_from_static_method' => 'getServiceFromStaticMethodService',
  41. );
  42. $this->aliases = array(
  43. 'alias_for_alias' => 'foo',
  44. 'alias_for_foo' => 'foo',
  45. 'decorated' => 'decorator_service_with_name',
  46. );
  47. }
  48. /**
  49. * {@inheritdoc}
  50. */
  51. public function compile()
  52. {
  53. throw new LogicException('You cannot compile a dumped frozen container.');
  54. }
  55. /**
  56. * {@inheritdoc}
  57. */
  58. public function isFrozen()
  59. {
  60. return true;
  61. }
  62. /**
  63. * Gets the public 'bar' shared service.
  64. *
  65. * @return \Bar\FooClass
  66. */
  67. protected function getBarService()
  68. {
  69. $a = $this->get('foo.baz');
  70. $this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
  71. $a->configure($instance);
  72. return $instance;
  73. }
  74. /**
  75. * Gets the public 'baz' shared service.
  76. *
  77. * @return \Baz
  78. */
  79. protected function getBazService()
  80. {
  81. $this->services['baz'] = $instance = new \Baz();
  82. $instance->setFoo($this->get('foo_with_inline'));
  83. return $instance;
  84. }
  85. /**
  86. * Gets the public 'configured_service' shared service.
  87. *
  88. * @return \stdClass
  89. */
  90. protected function getConfiguredServiceService()
  91. {
  92. $a = new \ConfClass();
  93. $a->setFoo($this->get('baz'));
  94. $this->services['configured_service'] = $instance = new \stdClass();
  95. $a->configureStdClass($instance);
  96. return $instance;
  97. }
  98. /**
  99. * Gets the public 'decorator_service' shared service.
  100. *
  101. * @return \stdClass
  102. */
  103. protected function getDecoratorServiceService()
  104. {
  105. return $this->services['decorator_service'] = new \stdClass();
  106. }
  107. /**
  108. * Gets the public 'decorator_service_with_name' shared service.
  109. *
  110. * @return \stdClass
  111. */
  112. protected function getDecoratorServiceWithNameService()
  113. {
  114. return $this->services['decorator_service_with_name'] = new \stdClass();
  115. }
  116. /**
  117. * Gets the public 'deprecated_service' shared service.
  118. *
  119. * @return \stdClass
  120. *
  121. * @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.
  122. */
  123. protected function getDeprecatedServiceService()
  124. {
  125. @trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
  126. return $this->services['deprecated_service'] = new \stdClass();
  127. }
  128. /**
  129. * Gets the public 'factory_service' shared service.
  130. *
  131. * @return \Bar
  132. */
  133. protected function getFactoryServiceService()
  134. {
  135. return $this->services['factory_service'] = $this->get('foo.baz')->getInstance();
  136. }
  137. /**
  138. * Gets the public 'foo' shared service.
  139. *
  140. * @return \Bar\FooClass
  141. */
  142. protected function getFooService()
  143. {
  144. $a = $this->get('foo.baz');
  145. $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this);
  146. $instance->foo = 'bar';
  147. $instance->moo = $a;
  148. $instance->qux = array('bar' => 'foo is bar', 'foobar' => 'bar');
  149. $instance->setBar($this->get('bar'));
  150. $instance->initialize();
  151. sc_configure($instance);
  152. return $instance;
  153. }
  154. /**
  155. * Gets the public 'foo.baz' shared service.
  156. *
  157. * @return \BazClass
  158. */
  159. protected function getFoo_BazService()
  160. {
  161. $this->services['foo.baz'] = $instance = \BazClass::getInstance();
  162. \BazClass::configureStatic1($instance);
  163. return $instance;
  164. }
  165. /**
  166. * Gets the public 'foo_bar' service.
  167. *
  168. * @return \Bar\FooClass
  169. */
  170. protected function getFooBarService()
  171. {
  172. return new \Bar\FooClass();
  173. }
  174. /**
  175. * Gets the public 'foo_with_inline' shared service.
  176. *
  177. * @return \Foo
  178. */
  179. protected function getFooWithInlineService()
  180. {
  181. $a = new \Bar();
  182. $this->services['foo_with_inline'] = $instance = new \Foo();
  183. $a->pub = 'pub';
  184. $a->setBaz($this->get('baz'));
  185. $instance->setBar($a);
  186. return $instance;
  187. }
  188. /**
  189. * Gets the public 'method_call1' shared service.
  190. *
  191. * @return \Bar\FooClass
  192. */
  193. protected function getMethodCall1Service()
  194. {
  195. require_once '%path%foo.php';
  196. $this->services['method_call1'] = $instance = new \Bar\FooClass();
  197. $instance->setBar($this->get('foo'));
  198. $instance->setBar(NULL);
  199. $instance->setBar(($this->get("foo")->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
  200. return $instance;
  201. }
  202. /**
  203. * Gets the public 'new_factory_service' shared service.
  204. *
  205. * @return \FooBarBaz
  206. */
  207. protected function getNewFactoryServiceService()
  208. {
  209. $a = new \FactoryClass();
  210. $a->foo = 'bar';
  211. $this->services['new_factory_service'] = $instance = $a->getInstance();
  212. $instance->foo = 'bar';
  213. return $instance;
  214. }
  215. /**
  216. * Gets the public 'request' shared service.
  217. *
  218. * @throws RuntimeException always since this service is expected to be injected dynamically
  219. */
  220. protected function getRequestService()
  221. {
  222. throw new RuntimeException('You have requested a synthetic service ("request"). The DIC does not know how to construct this service.');
  223. }
  224. /**
  225. * Gets the public 'service_from_static_method' shared service.
  226. *
  227. * @return \Bar\FooClass
  228. */
  229. protected function getServiceFromStaticMethodService()
  230. {
  231. return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance();
  232. }
  233. /**
  234. * {@inheritdoc}
  235. */
  236. public function getParameter($name)
  237. {
  238. $name = strtolower($name);
  239. if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters))) {
  240. throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
  241. }
  242. return $this->parameters[$name];
  243. }
  244. /**
  245. * {@inheritdoc}
  246. */
  247. public function hasParameter($name)
  248. {
  249. $name = strtolower($name);
  250. return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters);
  251. }
  252. /**
  253. * {@inheritdoc}
  254. */
  255. public function setParameter($name, $value)
  256. {
  257. throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
  258. }
  259. /**
  260. * {@inheritdoc}
  261. */
  262. public function getParameterBag()
  263. {
  264. if (null === $this->parameterBag) {
  265. $this->parameterBag = new FrozenParameterBag($this->parameters);
  266. }
  267. return $this->parameterBag;
  268. }
  269. /**
  270. * Gets the default parameters.
  271. *
  272. * @return array An array of the default parameters
  273. */
  274. protected function getDefaultParameters()
  275. {
  276. return array(
  277. 'baz_class' => 'BazClass',
  278. 'foo_class' => 'Bar\\FooClass',
  279. 'foo' => 'bar',
  280. );
  281. }
  282. }