You are here

services6.yml in Service Container 7

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/yaml/services6.yml
View source
  1. services:
  2. foo: { class: FooClass }
  3. baz: { class: BazClass }
  4. scope.container: { class: FooClass, scope: container }
  5. scope.custom: { class: FooClass, scope: custom }
  6. scope.prototype: { class: FooClass, scope: prototype }
  7. file: { class: FooClass, file: %path%/foo.php }
  8. arguments: { class: FooClass, arguments: [foo, @foo, [true, false]] }
  9. configurator1: { class: FooClass, configurator: sc_configure }
  10. configurator2: { class: FooClass, configurator: [@baz, configure] }
  11. configurator3: { class: FooClass, configurator: [BazClass, configureStatic] }
  12. method_call1:
  13. class: FooClass
  14. calls:
  15. - [ setBar, [] ]
  16. - [ setBar ]
  17. - [ setBar, ['@=service("foo").foo() ~ (container.hasparameter("foo") ? parameter("foo") : "default")'] ]
  18. method_call2:
  19. class: FooClass
  20. calls:
  21. - [ setBar, [ foo, @foo, [true, false] ] ]
  22. alias_for_foo: @foo
  23. another_alias_for_foo:
  24. alias: foo
  25. public: false
  26. decorator_service:
  27. decorates: decorated
  28. decorator_service_with_name:
  29. decorates: decorated
  30. decoration_inner_name: decorated.pif-pouf
  31. new_factory1: { class: FooBarClass, factory: factory}
  32. new_factory2: { class: FooBarClass, factory: [@baz, getClass]}
  33. new_factory3: { class: FooBarClass, factory: [BazClass, getInstance]}