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="scope" type="xsd:string" />
108 <xsd:attribute name="public" type="boolean" />
109 <xsd:attribute name="synthetic" type="boolean" />
110 <xsd:attribute name="synchronized" type="boolean" />
111 <xsd:attribute name="lazy" type="boolean" />
112 <xsd:attribute name="abstract" type="boolean" />
113 <xsd:attribute name="factory-class" type="xsd:string" />
114 <xsd:attribute name="factory-method" type="xsd:string" />
115 <xsd:attribute name="factory-service" type="xsd:string" />
116 <xsd:attribute name="alias" type="xsd:string" />
117 <xsd:attribute name="parent" type="xsd:string" />
118 <xsd:attribute name="decorates" type="xsd:string" />
119 <xsd:attribute name="decoration-inner-name" type="xsd:string" />
120 <xsd:attribute name="decoration-priority" type="xsd:integer" />
121 <xsd:attribute name="autowire" type="boolean" />
124 <xsd:complexType name="tag">
125 <xsd:attribute name="name" type="xsd:string" use="required" />
126 <xsd:anyAttribute namespace="##any" processContents="lax" />
129 <xsd:complexType name="parameters">
130 <xsd:choice minOccurs="1" maxOccurs="unbounded">
131 <xsd:element name="parameter" type="parameter" />
133 <xsd:attribute name="type" type="parameter_type" />
134 <xsd:attribute name="key" type="xsd:string" />
137 <xsd:complexType name="parameter" mixed="true">
138 <xsd:choice minOccurs="0" maxOccurs="unbounded">
139 <xsd:element name="parameter" type="parameter" />
141 <xsd:attribute name="type" type="parameter_type" />
142 <xsd:attribute name="id" type="xsd:string" />
143 <xsd:attribute name="key" type="xsd:string" />
144 <xsd:attribute name="on-invalid" type="invalid_sequence" />
147 <xsd:complexType name="property" mixed="true">
148 <xsd:choice minOccurs="0">
149 <xsd:element name="property" type="property" maxOccurs="unbounded" />
150 <xsd:element name="service" type="service" />
152 <xsd:attribute name="type" type="argument_type" />
153 <xsd:attribute name="id" type="xsd:string" />
154 <xsd:attribute name="key" type="xsd:string" />
155 <xsd:attribute name="name" type="xsd:string" />
156 <xsd:attribute name="on-invalid" type="invalid_sequence" />
157 <xsd:attribute name="strict" type="boolean" />
160 <xsd:complexType name="argument" mixed="true">
161 <xsd:choice minOccurs="0">
162 <xsd:element name="argument" type="argument" maxOccurs="unbounded" />
163 <xsd:element name="service" type="service" />
165 <xsd:attribute name="type" type="argument_type" />
166 <xsd:attribute name="id" type="xsd:string" />
167 <xsd:attribute name="key" type="xsd:string" />
168 <xsd:attribute name="index" type="xsd:integer" />
169 <xsd:attribute name="on-invalid" type="invalid_sequence" />
170 <xsd:attribute name="strict" type="boolean" />
173 <xsd:complexType name="call">
174 <xsd:choice minOccurs="0">
175 <xsd:element name="argument" type="argument" maxOccurs="unbounded" />
177 <xsd:attribute name="method" type="xsd:string" />
180 <xsd:simpleType name="parameter_type">
181 <xsd:restriction base="xsd:string">
182 <xsd:enumeration value="collection" />
183 <xsd:enumeration value="string" />
184 <xsd:enumeration value="constant" />
188 <xsd:simpleType name="argument_type">
189 <xsd:restriction base="xsd:string">
190 <xsd:enumeration value="collection" />
191 <xsd:enumeration value="service" />
192 <xsd:enumeration value="expression" />
193 <xsd:enumeration value="string" />
194 <xsd:enumeration value="constant" />
198 <xsd:simpleType name="invalid_sequence">
199 <xsd:restriction base="xsd:string">
200 <xsd:enumeration value="null" />
201 <xsd:enumeration value="ignore" />
202 <xsd:enumeration value="exception" />
206 <xsd:simpleType name="boolean">
207 <xsd:restriction base="xsd:string">
208 <xsd:pattern value="(%.+%|true|false)" />