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/xml/services6.xml
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

49 lines
1.8 KiB
XML

<?xml version="1.0" ?>
<container xmlns="http://www.symfony-project.org/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.symfony-project.org/schema/dic/services http://www.symfony-project.org/schema/dic/services/services-1.0.xsd">
<services>
<service id="foo" class="FooClass" />
<service id="baz" class="BazClass" />
<service id="shared" class="FooClass" shared="true" />
<service id="non_shared" class="FooClass" shared="false" />
<service id="constructor" class="FooClass" factory-method="getInstance" />
<service id="file" class="FooClass">
<file>%path%/foo.php</file>
</service>
<service id="arguments" class="FooClass">
<argument>foo</argument>
<argument type="service" id="foo" />
<argument type="collection">
<argument>true</argument>
<argument>false</argument>
</argument>
</service>
<service id="configurator1" class="FooClass">
<configurator function="sc_configure" />
</service>
<service id="configurator2" class="FooClass">
<configurator service="baz" method="configure" />
</service>
<service id="configurator3" class="FooClass">
<configurator class="BazClass" method="configureStatic" />
</service>
<service id="method_call1" class="FooClass">
<call method="setBar" />
</service>
<service id="method_call2" class="FooClass">
<call method="setBar">
<argument>foo</argument>
<argument type="service" id="foo" />
<argument type="collection">
<argument>true</argument>
<argument>false</argument>
</argument>
</call>
</service>
<service id="alias_for_foo" alias="foo" />
<service id="factory_service" factory-method="getInstance" factory-service="baz_factory" />
</services>
</container>