services-1.0.xsd 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <xsd:schema xmlns="http://symfony.com/schema/dic/services"
  3. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  4. targetNamespace="http://symfony.com/schema/dic/services"
  5. elementFormDefault="qualified">
  6. <xsd:annotation>
  7. <xsd:documentation><![CDATA[
  8. Symfony XML Services Schema, version 1.0
  9. Authors: Fabien Potencier
  10. This defines a way to describe PHP objects (services) and their
  11. dependencies.
  12. ]]></xsd:documentation>
  13. </xsd:annotation>
  14. <xsd:element name="container" type="container" />
  15. <xsd:complexType name="container">
  16. <xsd:annotation>
  17. <xsd:documentation><![CDATA[
  18. The root element of a service file.
  19. ]]></xsd:documentation>
  20. </xsd:annotation>
  21. <xsd:sequence>
  22. <xsd:group ref="foreign" />
  23. <xsd:sequence minOccurs="0">
  24. <xsd:element name="imports" type="imports" />
  25. <xsd:group ref="foreign" />
  26. </xsd:sequence>
  27. <xsd:sequence minOccurs="0">
  28. <xsd:element name="parameters" type="parameters" />
  29. <xsd:group ref="foreign" />
  30. </xsd:sequence>
  31. <xsd:sequence minOccurs="0">
  32. <xsd:element name="services" type="services" />
  33. <xsd:group ref="foreign" />
  34. </xsd:sequence>
  35. </xsd:sequence>
  36. </xsd:complexType>
  37. <xsd:group name="foreign">
  38. <xsd:sequence>
  39. <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
  40. </xsd:sequence>
  41. </xsd:group>
  42. <xsd:complexType name="services">
  43. <xsd:annotation>
  44. <xsd:documentation><![CDATA[
  45. Enclosing element for the definition of all services
  46. ]]></xsd:documentation>
  47. </xsd:annotation>
  48. <xsd:choice minOccurs="1" maxOccurs="unbounded">
  49. <xsd:element name="service" type="service" />
  50. </xsd:choice>
  51. </xsd:complexType>
  52. <xsd:complexType name="imports">
  53. <xsd:annotation>
  54. <xsd:documentation><![CDATA[
  55. Enclosing element for the import elements
  56. ]]></xsd:documentation>
  57. </xsd:annotation>
  58. <xsd:choice minOccurs="1" maxOccurs="unbounded">
  59. <xsd:element name="import" type="import" />
  60. </xsd:choice>
  61. </xsd:complexType>
  62. <xsd:complexType name="import">
  63. <xsd:annotation>
  64. <xsd:documentation><![CDATA[
  65. Import an external resource defining other services or parameters
  66. ]]></xsd:documentation>
  67. </xsd:annotation>
  68. <xsd:attribute name="resource" type="xsd:string" use="required" />
  69. <xsd:attribute name="ignore-errors" type="boolean" />
  70. </xsd:complexType>
  71. <xsd:complexType name="callable">
  72. <xsd:choice minOccurs="0" maxOccurs="1">
  73. <xsd:element name="service" type="service" minOccurs="0" maxOccurs="1" />
  74. </xsd:choice>
  75. <xsd:attribute name="id" type="xsd:string" />
  76. <xsd:attribute name="service" type="xsd:string" />
  77. <xsd:attribute name="class" type="xsd:string" />
  78. <xsd:attribute name="method" type="xsd:string" />
  79. <xsd:attribute name="function" type="xsd:string" />
  80. </xsd:complexType>
  81. <xsd:complexType name="service">
  82. <xsd:choice maxOccurs="unbounded">
  83. <xsd:element name="file" type="xsd:string" minOccurs="0" maxOccurs="1" />
  84. <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
  85. <xsd:element name="configurator" type="callable" minOccurs="0" maxOccurs="1" />
  86. <xsd:element name="factory" type="callable" minOccurs="0" maxOccurs="1" />
  87. <xsd:element name="deprecated" type="xsd:string" minOccurs="0" maxOccurs="1" />
  88. <xsd:element name="call" type="call" minOccurs="0" maxOccurs="unbounded" />
  89. <xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
  90. <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
  91. <xsd:element name="autowiring-type" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
  92. </xsd:choice>
  93. <xsd:attribute name="id" type="xsd:string" />
  94. <xsd:attribute name="class" type="xsd:string" />
  95. <xsd:attribute name="shared" type="boolean" />
  96. <xsd:attribute name="scope" type="xsd:string" />
  97. <xsd:attribute name="public" type="boolean" />
  98. <xsd:attribute name="synthetic" type="boolean" />
  99. <xsd:attribute name="synchronized" type="boolean" />
  100. <xsd:attribute name="lazy" type="boolean" />
  101. <xsd:attribute name="abstract" type="boolean" />
  102. <xsd:attribute name="factory-class" type="xsd:string" />
  103. <xsd:attribute name="factory-method" type="xsd:string" />
  104. <xsd:attribute name="factory-service" type="xsd:string" />
  105. <xsd:attribute name="alias" type="xsd:string" />
  106. <xsd:attribute name="parent" type="xsd:string" />
  107. <xsd:attribute name="decorates" type="xsd:string" />
  108. <xsd:attribute name="decoration-inner-name" type="xsd:string" />
  109. <xsd:attribute name="decoration-priority" type="xsd:integer" />
  110. <xsd:attribute name="autowire" type="boolean" />
  111. </xsd:complexType>
  112. <xsd:complexType name="tag">
  113. <xsd:attribute name="name" type="xsd:string" use="required" />
  114. <xsd:anyAttribute namespace="##any" processContents="lax" />
  115. </xsd:complexType>
  116. <xsd:complexType name="parameters">
  117. <xsd:choice minOccurs="1" maxOccurs="unbounded">
  118. <xsd:element name="parameter" type="parameter" />
  119. </xsd:choice>
  120. <xsd:attribute name="type" type="parameter_type" />
  121. <xsd:attribute name="key" type="xsd:string" />
  122. </xsd:complexType>
  123. <xsd:complexType name="parameter" mixed="true">
  124. <xsd:choice minOccurs="0" maxOccurs="unbounded">
  125. <xsd:element name="parameter" type="parameter" />
  126. </xsd:choice>
  127. <xsd:attribute name="type" type="parameter_type" />
  128. <xsd:attribute name="id" type="xsd:string" />
  129. <xsd:attribute name="key" type="xsd:string" />
  130. <xsd:attribute name="on-invalid" type="invalid_sequence" />
  131. </xsd:complexType>
  132. <xsd:complexType name="property" mixed="true">
  133. <xsd:choice minOccurs="0">
  134. <xsd:element name="property" type="property" maxOccurs="unbounded" />
  135. <xsd:element name="service" type="service" />
  136. </xsd:choice>
  137. <xsd:attribute name="type" type="argument_type" />
  138. <xsd:attribute name="id" type="xsd:string" />
  139. <xsd:attribute name="key" type="xsd:string" />
  140. <xsd:attribute name="name" type="xsd:string" />
  141. <xsd:attribute name="on-invalid" type="invalid_sequence" />
  142. <xsd:attribute name="strict" type="boolean" />
  143. </xsd:complexType>
  144. <xsd:complexType name="argument" mixed="true">
  145. <xsd:choice minOccurs="0">
  146. <xsd:element name="argument" type="argument" maxOccurs="unbounded" />
  147. <xsd:element name="service" type="service" />
  148. </xsd:choice>
  149. <xsd:attribute name="type" type="argument_type" />
  150. <xsd:attribute name="id" type="xsd:string" />
  151. <xsd:attribute name="key" type="xsd:string" />
  152. <xsd:attribute name="index" type="xsd:integer" />
  153. <xsd:attribute name="on-invalid" type="invalid_sequence" />
  154. <xsd:attribute name="strict" type="boolean" />
  155. </xsd:complexType>
  156. <xsd:complexType name="call">
  157. <xsd:choice minOccurs="0">
  158. <xsd:element name="argument" type="argument" maxOccurs="unbounded" />
  159. </xsd:choice>
  160. <xsd:attribute name="method" type="xsd:string" />
  161. </xsd:complexType>
  162. <xsd:simpleType name="parameter_type">
  163. <xsd:restriction base="xsd:string">
  164. <xsd:enumeration value="collection" />
  165. <xsd:enumeration value="string" />
  166. <xsd:enumeration value="constant" />
  167. </xsd:restriction>
  168. </xsd:simpleType>
  169. <xsd:simpleType name="argument_type">
  170. <xsd:restriction base="xsd:string">
  171. <xsd:enumeration value="collection" />
  172. <xsd:enumeration value="service" />
  173. <xsd:enumeration value="expression" />
  174. <xsd:enumeration value="string" />
  175. <xsd:enumeration value="constant" />
  176. </xsd:restriction>
  177. </xsd:simpleType>
  178. <xsd:simpleType name="invalid_sequence">
  179. <xsd:restriction base="xsd:string">
  180. <xsd:enumeration value="null" />
  181. <xsd:enumeration value="ignore" />
  182. <xsd:enumeration value="exception" />
  183. </xsd:restriction>
  184. </xsd:simpleType>
  185. <xsd:simpleType name="boolean">
  186. <xsd:restriction base="xsd:string">
  187. <xsd:pattern value="(%.+%|true|false)" />
  188. </xsd:restriction>
  189. </xsd:simpleType>
  190. </xsd:schema>