legacy-services9.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
  3. <parameters>
  4. <parameter key="foo_class">Bar\FooClass</parameter>
  5. <parameter key="baz_class">BazClass</parameter>
  6. <parameter key="foo">bar</parameter>
  7. </parameters>
  8. <services>
  9. <service id="foo" class="Bar\FooClass" factory-method="getInstance" factory-class="Bar\FooClass">
  10. <tag name="foo" foo="foo"/>
  11. <tag name="foo" bar="bar"/>
  12. <argument>foo</argument>
  13. <argument type="service" id="foo.baz"/>
  14. <argument type="collection">
  15. <argument key="%foo%">foo is %foo%</argument>
  16. <argument key="foobar">%foo%</argument>
  17. </argument>
  18. <argument>true</argument>
  19. <argument type="service" id="service_container"/>
  20. <property name="foo">bar</property>
  21. <property name="moo" type="service" id="foo.baz"/>
  22. <property name="qux" type="collection">
  23. <property key="%foo%">foo is %foo%</property>
  24. <property key="foobar">%foo%</property>
  25. </property>
  26. <call method="setBar">
  27. <argument type="service" id="bar"/>
  28. </call>
  29. <call method="initialize"/>
  30. <configurator function="sc_configure"/>
  31. </service>
  32. <service id="foo.baz" class="%baz_class%" factory-method="getInstance" factory-class="%baz_class%">
  33. <configurator class="%baz_class%" method="configureStatic1"/>
  34. </service>
  35. <service id="factory_service" class="Bar" factory-method="getInstance" factory-service="foo.baz"/>
  36. <service id="foo_bar" class="%foo_class%" shared="false" scope="prototype"/>
  37. </services>
  38. </container>