1 <?xml version="1.0" encoding="UTF-8" ?>
3 <xsd:schema xmlns="http://symfony.com/schema/dic/services"
4 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5 targetNamespace="http://symfony.com/schema/dic/services"
6 elementFormDefault="qualified">
9 <xsd:documentation><![CDATA[
10 Symfony XML Services Schema, version 1.0
11 Authors: Fabien Potencier
13 This defines a way to describe PHP objects (services) and their
15 ]]></xsd:documentation>
18 <xsd:element name="container" type="container" />
20 <xsd:complexType name="container">
22 <xsd:documentation><![CDATA[
23 The root element of a service file.
24 ]]></xsd:documentation>
27 <xsd:group ref="foreign" />
28 <xsd:sequence minOccurs="0">
29 <xsd:element name="imports" type="imports" />
30 <xsd:group ref="foreign" />
32 <xsd:sequence minOccurs="0">
33 <xsd:element name="parameters" type="parameters" />
34 <xsd:group ref="foreign" />
36 <xsd:sequence minOccurs="0">
37 <xsd:element name="services" type="services" />
38 <xsd:group ref="foreign" />
43 <xsd:group name="foreign">
45 <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
49 <xsd:complexType name="services">
51 <xsd:documentation><![CDATA[
52 Enclosing element for the definition of all services
53 ]]></xsd:documentation>
55 <xsd:choice minOccurs="1" maxOccurs="unbounded">
56 <xsd:element name="service" type="service" />
60 <xsd:complexType name="imports">
62 <xsd:documentation><![CDATA[
63 Enclosing element for the import elements
64 ]]></xsd:documentation>
66 <xsd:choice minOccurs="1" maxOccurs="unbounded">
67 <xsd:element name="import" type="import" />
71 <xsd:complexType name="import">
73 <xsd:documentation><![CDATA[
74 Import an external resource defining other services or parameters
75 ]]></xsd:documentation>
77 <xsd:attribute name="resource" type="xsd:string" use="required" />
78 <xsd:attribute name="ignore-errors" type="boolean" />
81 <xsd:complexType name="configurator">
82 <xsd:attribute name="id" type="xsd:string" />
83 <xsd:attribute name="service" type="xsd:string" />
84 <xsd:attribute name="class" type="xsd:string" />
85 <xsd:attribute name="method" type="xsd:string" />
86 <xsd:attribute name="function" type="xsd:string" />
89 <xsd:complexType name="service">
90 <xsd:choice maxOccurs="unbounded">
91 <xsd:element name="file" type="xsd:string" minOccurs="0" maxOccurs="1" />
92 <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
93 <xsd:element name="configurator" type="configurator" minOccurs="0" maxOccurs="1" />
94 <xsd:element name="call" type="call" minOccurs="0" maxOccurs="unbounded" />
95 <xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
96 <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
98 <xsd:attribute name="id" type="xsd:string" />
99 <xsd:attribute name="class" type="xsd:string" />
100 <xsd:attribute name="scope" type="xsd:string" />
101 <xsd:attribute name="public" type="boolean" />
102 <xsd:attribute name="synthetic" type="boolean" />
103 <xsd:attribute name="synchronized" type="boolean" />
104 <xsd:attribute name="lazy" type="boolean" />
105 <xsd:attribute name="abstract" type="boolean" />
106 <xsd:attribute name="factory-class" type="xsd:string" />
107 <xsd:attribute name="factory-method" type="xsd:string" />
108 <xsd:attribute name="factory-service" type="xsd:string" />
109 <xsd:attribute name="alias" type="xsd:string" />
110 <xsd:attribute name="parent" type="xsd:string" />
113 <xsd:complexType name="tag">
114 <xsd:attribute name="name" type="xsd:string" use="required" />
115 <xsd:anyAttribute namespace="##any" processContents="lax" />
118 <xsd:complexType name="parameters">
119 <xsd:choice minOccurs="1" maxOccurs="unbounded">
120 <xsd:element name="parameter" type="parameter" />
122 <xsd:attribute name="type" type="parameter_type" />
123 <xsd:attribute name="key" type="xsd:string" />
126 <xsd:complexType name="parameter" mixed="true">
127 <xsd:choice minOccurs="0" maxOccurs="unbounded">
128 <xsd:element name="parameter" type="parameter" />
130 <xsd:attribute name="type" type="parameter_type" />
131 <xsd:attribute name="id" type="xsd:string" />
132 <xsd:attribute name="key" type="xsd:string" />
133 <xsd:attribute name="on-invalid" type="invalid_sequence" />
136 <xsd:complexType name="property" mixed="true">
137 <xsd:choice minOccurs="0" maxOccurs="1">
138 <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
139 <xsd:element name="service" type="service" />
141 <xsd:attribute name="type" type="argument_type" />
142 <xsd:attribute name="id" type="xsd:string" />
143 <xsd:attribute name="key" type="xsd:string" />
144 <xsd:attribute name="name" type="xsd:string" />
145 <xsd:attribute name="on-invalid" type="xsd:string" />
146 <xsd:attribute name="strict" type="boolean" />
149 <xsd:complexType name="argument" mixed="true">
150 <xsd:choice maxOccurs="unbounded">
151 <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
152 <xsd:element name="service" type="service" />
154 <xsd:attribute name="type" type="argument_type" />
155 <xsd:attribute name="id" type="xsd:string" />
156 <xsd:attribute name="key" type="xsd:string" />
157 <xsd:attribute name="index" type="xsd:integer" />
158 <xsd:attribute name="on-invalid" type="xsd:string" />
159 <xsd:attribute name="strict" type="boolean" />
162 <xsd:complexType name="call" mixed="true">
163 <xsd:choice maxOccurs="unbounded">
164 <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
165 <xsd:element name="service" type="service" />
167 <xsd:attribute name="method" type="xsd:string" />
170 <xsd:simpleType name="parameter_type">
171 <xsd:restriction base="xsd:string">
172 <xsd:enumeration value="collection" />
173 <xsd:enumeration value="string" />
174 <xsd:enumeration value="constant" />
178 <xsd:simpleType name="argument_type">
179 <xsd:restriction base="xsd:string">
180 <xsd:enumeration value="collection" />
181 <xsd:enumeration value="service" />
182 <xsd:enumeration value="string" />
183 <xsd:enumeration value="constant" />
187 <xsd:simpleType name="invalid_sequence">
188 <xsd:restriction base="xsd:string">
189 <xsd:enumeration value="null" />
190 <xsd:enumeration value="ignore" />
191 <xsd:enumeration value="exception" />
195 <xsd:simpleType name="boolean">
196 <xsd:restriction base="xsd:string">
197 <xsd:pattern value="(%.+%|true|false)" />