This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests/Symfony/Tests/Components/DependencyInjection/Fixtures/yaml/services6.yml
Fabien Potencier 8d067bac51 [DepedencyInjection] amended previous commit
* fixed coding standards
 * made class optional as it is not defined when using a factory service
 * renamed factory attributes in XML files, updated XSD
 * removed the factory-class as it does nothing more than the regular class attribute
 * moved usage of Reflection as 'class' is not defined when a factory-service is used
 * added more tests
 * fixed PHP dumper
2010-07-05 11:08:56 +02:00

22 lines
844 B
YAML

services:
foo: { class: FooClass }
baz: { class: BazClass }
shared: { class: FooClass, shared: true }
non_shared: { class: FooClass, shared: false }
constructor: { class: FooClass, factory_method: getInstance }
file: { class: FooClass, file: %path%/foo.php }
arguments: { class: FooClass, arguments: [foo, @foo, [true, false]] }
configurator1: { class: FooClass, configurator: sc_configure }
configurator2: { class: FooClass, configurator: [@baz, configure] }
configurator3: { class: FooClass, configurator: [BazClass, configureStatic] }
method_call1:
class: FooClass
calls:
- [ setBar, [] ]
method_call2:
class: FooClass
calls:
- [ setBar, [ foo, @foo, [true, false] ] ]
alias_for_foo: @foo
factory_service: { class: BazClass, factory_method: getInstance, factory_service: baz_factory }