PageRenderTime 38ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/personal_collection_movies/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php

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