55 lines
1.9 KiB
XML
55 lines
1.9 KiB
XML
<?xml version="1.0" ?>
|
|
|
|
<container xmlns="http://symfony-project.org/2.0/container">
|
|
<parameters>
|
|
<parameter key="baz_class">BazClass</parameter>
|
|
<parameter key="foo_class">FooClass</parameter>
|
|
<parameter key="foo">bar</parameter>
|
|
<parameter key="foo_bar" type="service" id="foo_bar" />
|
|
</parameters>
|
|
<services>
|
|
<service id="foo" class="FooClass" constructor="getInstance" shared="false">
|
|
<file>%path%/foo.php</file>
|
|
<argument>foo</argument>
|
|
<argument type="service" id="foo.baz" />
|
|
<argument type="collection">
|
|
<argument key="%foo%">foo is %foo%</argument>
|
|
<argument key="bar">%foo%</argument>
|
|
</argument>
|
|
<argument>true</argument>
|
|
<argument type="service" id="service_container" />
|
|
<call method="setBar">
|
|
<argument>bar</argument>
|
|
</call>
|
|
<call method="initialize" />
|
|
<configurator function="sc_configure" />
|
|
</service>
|
|
<service id="bar" class="FooClass">
|
|
<argument>foo</argument>
|
|
<argument type="service" id="foo.baz" />
|
|
<argument>%foo_bar%</argument>
|
|
<configurator service="foo.baz" method="configure" />
|
|
</service>
|
|
<service id="foo.baz" class="%baz_class%" constructor="getInstance">
|
|
<configurator class="%baz_class%" method="configureStatic1" />
|
|
</service>
|
|
<service id="foo_bar" class="%foo_class%">
|
|
</service>
|
|
<service id="method_call1" class="FooClass">
|
|
<call method="setBar">
|
|
<argument type="service" id="foo" />
|
|
</call>
|
|
<call method="setBar">
|
|
<argument type="service" id="foo" on-invalid="null" />
|
|
</call>
|
|
<call method="setBar">
|
|
<argument type="service" id="foo" on-invalid="ignore" />
|
|
</call>
|
|
<call method="setBar">
|
|
<argument type="service" id="foobaz" on-invalid="ignore" />
|
|
</call>
|
|
</service>
|
|
<service id="alias_for_foo" alias="foo" />
|
|
</services>
|
|
</container>
|