services19.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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\ParameterBag;
  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. parent::__construct();
  20. $this->methodMap = array(
  21. 'service_from_anonymous_factory' => 'getServiceFromAnonymousFactoryService',
  22. 'service_with_method_call_and_factory' => 'getServiceWithMethodCallAndFactoryService',
  23. );
  24. }
  25. /**
  26. * Gets the public 'service_from_anonymous_factory' shared service.
  27. *
  28. * @return \Bar\FooClass
  29. */
  30. protected function getServiceFromAnonymousFactoryService()
  31. {
  32. return $this->services['service_from_anonymous_factory'] = call_user_func(array(new \Bar\FooClass(), 'getInstance'));
  33. }
  34. /**
  35. * Gets the public 'service_with_method_call_and_factory' shared service.
  36. *
  37. * @return \Bar\FooClass
  38. */
  39. protected function getServiceWithMethodCallAndFactoryService()
  40. {
  41. $this->services['service_with_method_call_and_factory'] = $instance = new \Bar\FooClass();
  42. $instance->setBar(\Bar\FooClass::getInstance());
  43. return $instance;
  44. }
  45. }