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="callable">
82 <xsd:choice minOccurs="0" maxOccurs="1">
83 <xsd:element name="service" type="service" minOccurs="0" maxOccurs="1" />
85 <xsd:attribute name="id" type="xsd:string" />
86 <xsd:attribute name="service" type="xsd:string" />
87 <xsd:attribute name="class" type="xsd:string" />
88 <xsd:attribute name="method" type="xsd:string" />
89 <xsd:attribute name="function" type="xsd:string" />
92 <xsd:complexType name="service">
93 <xsd:choice maxOccurs="unbounded">
94 <xsd:element name="file" type="xsd:string" minOccurs="0" maxOccurs="1" />
95 <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
96 <xsd:element name="configurator" type="callable" minOccurs="0" maxOccurs="1" />
97 <xsd:element name="factory" type="callable" minOccurs="0" maxOccurs="1" />
98 <xsd:element name="deprecated" type="xsd:string" minOccurs="0" maxOccurs="1" />
99 <xsd:element name="call" type="call" minOccurs="0" maxOccurs="unbounded" />
100 <xsd:element name="tag" type="tag" minOccurs="0" maxOccurs="unbounded" />
101 <xsd:element name="property" type="property" minOccurs="0" maxOccurs="unbounded" />
102 <xsd:element name="autowiring-type" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
104 <xsd:attribute name="id" type="xsd:string" />
105 <xsd:attribute name="class" type="xsd:string" />
106 <xsd:attribute name="shared" type="boolean" />
107 <xsd:attribute name="public" type="boolean" />
108 <xsd:attribute name="synthetic" type="boolean" />
109 <xsd:attribute name="lazy" type="boolean" />
110 <xsd:attribute name="abstract" type="boolean" />
111 <xsd:attribute name="alias" type="xsd:string" />
112 <xsd:attribute name="parent" type="xsd:string" />
113 <xsd:attribute name="decorates" type="xsd:string" />
114 <xsd:attribute name="decoration-inner-name" type="xsd:string" />
115 <xsd:attribute name="decoration-priority" type="xsd:integer" />
116 <xsd:attribute name="autowire" type="boolean" />
119 <xsd:complexType name="tag">
120 <xsd:attribute name="name" type="xsd:string" use="required" />
121 <xsd:anyAttribute namespace="##any" processContents="lax" />
124 <xsd:complexType name="parameters">
125 <xsd:choice minOccurs="1" maxOccurs="unbounded">
126 <xsd:element name="parameter" type="parameter" />
128 <xsd:attribute name="type" type="parameter_type" />
129 <xsd:attribute name="key" type="xsd:string" />
132 <xsd:complexType name="parameter" mixed="true">
133 <xsd:choice minOccurs="0" maxOccurs="unbounded">
134 <xsd:element name="parameter" type="parameter" />
136 <xsd:attribute name="type" type="parameter_type" />
137 <xsd:attribute name="id" type="xsd:string" />
138 <xsd:attribute name="key" type="xsd:string" />
139 <xsd:attribute name="on-invalid" type="invalid_sequence" />
142 <xsd:complexType name="property" mixed="true">
143 <xsd:choice minOccurs="0">
144 <xsd:element name="property" type="property" maxOccurs="unbounded" />
145 <xsd:element name="service" type="service" />
147 <xsd:attribute name="type" type="argument_type" />
148 <xsd:attribute name="id" type="xsd:string" />
149 <xsd:attribute name="key" type="xsd:string" />
150 <xsd:attribute name="name" type="xsd:string" />
151 <xsd:attribute name="on-invalid" type="invalid_sequence" />
152 <xsd:attribute name="strict" type="boolean" />
155 <xsd:complexType name="argument" mixed="true">
156 <xsd:choice minOccurs="0">
157 <xsd:element name="argument" type="argument" maxOccurs="unbounded" />
158 <xsd:element name="service" type="service" />
160 <xsd:attribute name="type" type="argument_type" />
161 <xsd:attribute name="id" type="xsd:string" />
162 <xsd:attribute name="key" type="xsd:string" />
163 <xsd:attribute name="index" type="xsd:integer" />
164 <xsd:attribute name="on-invalid" type="invalid_sequence" />
165 <xsd:attribute name="strict" type="boolean" />
168 <xsd:complexType name="call">
169 <xsd:choice minOccurs="0">
170 <xsd:element name="argument" type="argument" maxOccurs="unbounded" />
172 <xsd:attribute name="method" type="xsd:string" />
175 <xsd:simpleType name="parameter_type">
176 <xsd:restriction base="xsd:string">
177 <xsd:enumeration value="collection" />
178 <xsd:enumeration value="string" />
179 <xsd:enumeration value="constant" />
183 <xsd:simpleType name="argument_type">
184 <xsd:restriction base="xsd:string">
185 <xsd:enumeration value="collection" />
186 <xsd:enumeration value="service" />
187 <xsd:enumeration value="expression" />
188 <xsd:enumeration value="string" />
189 <xsd:enumeration value="constant" />
193 <xsd:simpleType name="invalid_sequence">
194 <xsd:restriction base="xsd:string">
195 <xsd:enumeration value="null" />
196 <xsd:enumeration value="ignore" />
197 <xsd:enumeration value="exception" />
201 <xsd:simpleType name="boolean">
202 <xsd:restriction base="xsd:string">
203 <xsd:pattern value="(%.+%|true|false)" />