services_interfaces-1-1.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. use Symfony\Component\DependencyInjection\ContainerInterface;
  3. use Symfony\Component\DependencyInjection\TaggedContainerInterface;
  4. use Symfony\Component\DependencyInjection\Container;
  5. use Symfony\Component\DependencyInjection\Reference;
  6. use Symfony\Component\DependencyInjection\Parameter;
  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 implements TaggedContainerInterface
  15. {
  16. /**
  17. * Constructor.
  18. */
  19. public function __construct()
  20. {
  21. parent::__construct(new FrozenParameterBag($this->getDefaultParameters()));
  22. }
  23. /**
  24. * Gets the 'foo' service.
  25. *
  26. * This service is shared.
  27. * This method always returns the same instance of the service.
  28. *
  29. * @return FooClass A FooClass instance.
  30. */
  31. protected function getFooService()
  32. {
  33. $this->services['foo'] = $instance = new \FooClass();
  34. $instance->setBar('someValue');
  35. return $instance;
  36. }
  37. /**
  38. * Returns service ids for a given tag.
  39. *
  40. * @param string $name The tag name
  41. *
  42. * @return array An array of tags
  43. */
  44. public function findTaggedServiceIds($name)
  45. {
  46. static $tags = array(
  47. );
  48. return isset($tags[$name]) ? $tags[$name] : array();
  49. }
  50. /**
  51. * Gets the default parameters.
  52. *
  53. * @return array An array of the default parameters
  54. */
  55. protected function getDefaultParameters()
  56. {
  57. return array(
  58. 'cla' => 'Fo',
  59. 'ss' => 'Class',
  60. );
  61. }
  62. }