|
@@ -0,0 +1,155 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+
|
|
|
+<xsd:schema xmlns="http://www.symfony-project.org/schema/services"
|
|
|
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
|
+ targetNamespace="http://www.symfony-project.org/schema/services"
|
|
|
+ elementFormDefault="qualified">
|
|
|
+
|
|
|
+ <xsd:annotation>
|
|
|
+ <xsd:documentation><![CDATA[
|
|
|
+ Symfony XML Services Schema, version 1.0
|
|
|
+ Authors: Fabien Potencier
|
|
|
+
|
|
|
+ This defines a way to describe PHP objects (services) and their
|
|
|
+ dependencies.
|
|
|
+ ]]></xsd:documentation>
|
|
|
+ </xsd:annotation>
|
|
|
+
|
|
|
+ <xsd:element name="container" type="container" />
|
|
|
+
|
|
|
+ <xsd:complexType name="container">
|
|
|
+ <xsd:annotation>
|
|
|
+ <xsd:documentation><![CDATA[
|
|
|
+ The root element of a service file.
|
|
|
+ ]]></xsd:documentation>
|
|
|
+ </xsd:annotation>
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
|
|
+ <xsd:element name="imports" type="imports" minOccurs="0" maxOccurs="1" />
|
|
|
+ <xsd:element name="parameters" type="parameters" minOccurs="0" maxOccurs="1" />
|
|
|
+ <xsd:element name="services" type="services" minOccurs="0" maxOccurs="1" />
|
|
|
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
|
|
+ </xsd:sequence>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:complexType name="services">
|
|
|
+ <xsd:annotation>
|
|
|
+ <xsd:documentation><![CDATA[
|
|
|
+ Enclosing element for the definition of all services
|
|
|
+ ]]></xsd:documentation>
|
|
|
+ </xsd:annotation>
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element name="service" type="service" minOccurs="1" maxOccurs="unbounded" />
|
|
|
+ </xsd:sequence>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:complexType name="imports">
|
|
|
+ <xsd:annotation>
|
|
|
+ <xsd:documentation><![CDATA[
|
|
|
+ Enclosing element for the import elements
|
|
|
+ ]]></xsd:documentation>
|
|
|
+ </xsd:annotation>
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element name="import" type="import" minOccurs="1" maxOccurs="unbounded" />
|
|
|
+ </xsd:sequence>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:complexType name="import">
|
|
|
+ <xsd:annotation>
|
|
|
+ <xsd:documentation><![CDATA[
|
|
|
+ Import an external resource defining other services or parameters
|
|
|
+ ]]></xsd:documentation>
|
|
|
+ </xsd:annotation>
|
|
|
+ <xsd:attribute name="resource" type="xsd:string" use="required" />
|
|
|
+ <xsd:attribute name="class" type="xsd:string">
|
|
|
+ <xsd:annotation>
|
|
|
+ <xsd:documentation><![CDATA[
|
|
|
+ The PHP class able to load the resource. If not defined, the loader uses the current loader.
|
|
|
+ ]]></xsd:documentation>
|
|
|
+ </xsd:annotation>
|
|
|
+ </xsd:attribute>
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:complexType name="configurator">
|
|
|
+ <xsd:attribute name="id" type="xsd:string" />
|
|
|
+ <xsd:attribute name="service" type="xsd:string" />
|
|
|
+ <xsd:attribute name="class" type="xsd:string" />
|
|
|
+ <xsd:attribute name="method" type="xsd:string" />
|
|
|
+ <xsd:attribute name="function" type="xsd:string" />
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:complexType name="service">
|
|
|
+ <xsd:choice maxOccurs="unbounded">
|
|
|
+ <xsd:element name="file" type="xsd:string" minOccurs="0" maxOccurs="1" />
|
|
|
+ <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
|
|
|
+ <xsd:element name="configurator" type="configurator" minOccurs="0" maxOccurs="1" />
|
|
|
+ <xsd:element name="call" type="call" minOccurs="0" maxOccurs="unbounded" />
|
|
|
+ </xsd:choice>
|
|
|
+ <xsd:attribute name="id" type="xsd:string" />
|
|
|
+ <xsd:attribute name="class" type="xsd:string" />
|
|
|
+ <xsd:attribute name="shared" type="boolean" />
|
|
|
+ <xsd:attribute name="constructor" type="xsd:string" />
|
|
|
+ <xsd:attribute name="alias" type="xsd:string" />
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:complexType name="parameters">
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element name="parameter" type="parameter" minOccurs="1" maxOccurs="unbounded" />
|
|
|
+ </xsd:sequence>
|
|
|
+ <xsd:attribute name="type" type="parameter_type" />
|
|
|
+ <xsd:attribute name="key" type="xsd:string" />
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:complexType name="parameter" mixed="true">
|
|
|
+ <xsd:sequence>
|
|
|
+ <xsd:element name="parameter" type="parameter" minOccurs="0" maxOccurs="unbounded" />
|
|
|
+ </xsd:sequence>
|
|
|
+ <xsd:attribute name="type" type="parameter_type" />
|
|
|
+ <xsd:attribute name="id" type="xsd:string" />
|
|
|
+ <xsd:attribute name="key" type="xsd:string" />
|
|
|
+ <xsd:attribute name="on-invalid" type="xsd:string" />
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:complexType name="argument" mixed="true">
|
|
|
+ <xsd:choice maxOccurs="unbounded">
|
|
|
+ <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
|
|
|
+ <xsd:element name="service" type="service" />
|
|
|
+ </xsd:choice>
|
|
|
+ <xsd:attribute name="type" type="argument_type" />
|
|
|
+ <xsd:attribute name="id" type="xsd:string" />
|
|
|
+ <xsd:attribute name="key" type="xsd:string" />
|
|
|
+ <xsd:attribute name="on-invalid" type="xsd:string" />
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:complexType name="call" mixed="true">
|
|
|
+ <xsd:choice maxOccurs="unbounded">
|
|
|
+ <xsd:element name="argument" type="argument" minOccurs="0" maxOccurs="unbounded" />
|
|
|
+ <xsd:element name="service" type="service" />
|
|
|
+ </xsd:choice>
|
|
|
+ <xsd:attribute name="method" type="xsd:string" />
|
|
|
+ </xsd:complexType>
|
|
|
+
|
|
|
+ <xsd:simpleType name="parameter_type">
|
|
|
+ <xsd:restriction base="xsd:string">
|
|
|
+ <xsd:enumeration value="collection" />
|
|
|
+ <xsd:enumeration value="service" />
|
|
|
+ <xsd:enumeration value="string" />
|
|
|
+ <xsd:enumeration value="constant" />
|
|
|
+ </xsd:restriction>
|
|
|
+ </xsd:simpleType>
|
|
|
+
|
|
|
+ <xsd:simpleType name="argument_type">
|
|
|
+ <xsd:restriction base="xsd:string">
|
|
|
+ <xsd:enumeration value="collection" />
|
|
|
+ <xsd:enumeration value="service" />
|
|
|
+ <xsd:enumeration value="string" />
|
|
|
+ <xsd:enumeration value="constant" />
|
|
|
+ </xsd:restriction>
|
|
|
+ </xsd:simpleType>
|
|
|
+
|
|
|
+ <xsd:simpleType name="boolean">
|
|
|
+ <xsd:restriction base="xsd:string">
|
|
|
+ <xsd:pattern value="(%.+%|true|false)" />
|
|
|
+ </xsd:restriction>
|
|
|
+ </xsd:simpleType>
|
|
|
+</xsd:schema>
|