Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

170 строки
6.9 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. /**
  4. * Schema for DI configuration
  5. *
  6. * Copyright © Magento, Inc. All rights reserved.
  7. * See COPYING.txt for license details.
  8. */
  9. -->
  10. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  11. <xs:redefine schemaLocation="urn:magento:framework:Data/etc/argument/types.xsd">
  12. <xs:complexType name="string">
  13. <xs:complexContent>
  14. <xs:extension base="argumentType">
  15. <xs:attribute name="translatable" use="optional" type="xs:boolean" />
  16. <xs:attribute name="sortOrder" use="optional" type="xs:integer"/>
  17. </xs:extension>
  18. </xs:complexContent>
  19. </xs:complexType>
  20. <xs:complexType name="argumentType" abstract="true" mixed="false">
  21. <xs:complexContent>
  22. <xs:extension base="argumentType" />
  23. </xs:complexContent>
  24. </xs:complexType>
  25. <xs:complexType name="object">
  26. <xs:complexContent>
  27. <xs:extension base="object">
  28. <xs:attribute name="shared" use="optional" type="xs:boolean"/>
  29. <xs:attribute name="sortOrder" use="optional" type="xs:integer"/>
  30. </xs:extension>
  31. </xs:complexContent>
  32. </xs:complexType>
  33. </xs:redefine>
  34. <xs:simpleType name="phpClassName">
  35. <xs:annotation>
  36. <xs:documentation>
  37. A string that matches a Fully Qualified Class Name from PHP, especially not starting
  38. with a backslash as this is an invalid character to start a class name with but a
  39. somewhat common mistake so this simple type can be used to validate against it
  40. already
  41. </xs:documentation>
  42. </xs:annotation>
  43. <xs:restriction base="xs:string">
  44. <xs:pattern value="(\\?[a-zA-Z_&#x7f;-&#xff;][a-zA-Z0-9_&#x7f;-&#xff;]*)(\\[a-zA-Z_&#x7f;-&#xff;][a-zA-Z0-9_&#x7f;-&#xff;]*)*"/>
  45. </xs:restriction>
  46. </xs:simpleType>
  47. <xs:complexType name="init_parameter">
  48. <xs:complexContent>
  49. <xs:extension base="argumentType" />
  50. </xs:complexContent>
  51. </xs:complexType>
  52. <xs:complexType name="const">
  53. <xs:complexContent>
  54. <xs:extension base="argumentType" />
  55. </xs:complexContent>
  56. </xs:complexType>
  57. <xs:element name="config">
  58. <xs:complexType>
  59. <xs:choice maxOccurs="unbounded">
  60. <xs:element name="preference" type="preferenceType" minOccurs="0" maxOccurs="unbounded" />
  61. <xs:element name="type" type="typeType" minOccurs="0" maxOccurs="unbounded">
  62. <xs:unique name="uniqueTypeParam">
  63. <xs:annotation>
  64. <xs:documentation>
  65. Param name should be unique in scope of type
  66. </xs:documentation>
  67. </xs:annotation>
  68. <xs:selector xpath="param" />
  69. <xs:field xpath="@name" />
  70. </xs:unique>
  71. </xs:element>
  72. <xs:element name="virtualType" type="virtualTypeType" minOccurs="0" maxOccurs="unbounded">
  73. <xs:unique name="uniqueVirtualTypeParam">
  74. <xs:annotation>
  75. <xs:documentation>
  76. Param name should be unique in scope of virtual type
  77. </xs:documentation>
  78. </xs:annotation>
  79. <xs:selector xpath="param" />
  80. <xs:field xpath="@name" />
  81. </xs:unique>
  82. </xs:element>
  83. </xs:choice>
  84. </xs:complexType>
  85. <xs:unique name="uniquePreference">
  86. <xs:annotation>
  87. <xs:documentation>
  88. Preference for each class should be unique in scope of file
  89. </xs:documentation>
  90. </xs:annotation>
  91. <xs:selector xpath="preference" />
  92. <xs:field xpath="@for" />
  93. </xs:unique>
  94. <xs:unique name="uniqueType">
  95. <xs:annotation>
  96. <xs:documentation>
  97. Type name should be unique in scope of file
  98. </xs:documentation>
  99. </xs:annotation>
  100. <xs:selector xpath="type" />
  101. <xs:field xpath="@name" />
  102. </xs:unique>
  103. <xs:unique name="uniqueVirtualType">
  104. <xs:annotation>
  105. <xs:documentation>
  106. Virtual type name should be unique in scope of file
  107. </xs:documentation>
  108. </xs:annotation>
  109. <xs:selector xpath="virtualType" />
  110. <xs:field xpath="@name" />
  111. </xs:unique>
  112. </xs:element>
  113. <xs:complexType name="preferenceType">
  114. <xs:annotation>
  115. <xs:documentation>
  116. Preference help Object Manager to choose class for corresponding interface
  117. </xs:documentation>
  118. </xs:annotation>
  119. <xs:attribute name="for" type="phpClassName" use="required"/>
  120. <xs:attribute name="type" type="phpClassName" use="required" />
  121. </xs:complexType>
  122. <xs:complexType name="typeType">
  123. <xs:annotation>
  124. <xs:documentation>
  125. With 'type' tag you can point parameters and plugins for certain class
  126. </xs:documentation>
  127. </xs:annotation>
  128. <xs:choice maxOccurs="unbounded">
  129. <xs:element name="arguments" type="argumentsType" minOccurs="0" maxOccurs="1">
  130. <xs:key name="argumentName">
  131. <xs:selector xpath="argument"></xs:selector>
  132. <xs:field xpath="@name"></xs:field>
  133. </xs:key>
  134. </xs:element>
  135. <xs:element name="plugin" type="pluginType" minOccurs="0" maxOccurs="unbounded" />
  136. </xs:choice>
  137. <xs:attribute name="name" type="phpClassName" use="required" />
  138. <xs:attribute name="shared" type="xs:boolean" use="optional" />
  139. </xs:complexType>
  140. <xs:complexType name="virtualTypeType">
  141. <xs:complexContent>
  142. <xs:extension base="typeType">
  143. <xs:annotation>
  144. <xs:documentation>
  145. With 'virtualType' tag you can point parameters and plugins for autogenerated class
  146. </xs:documentation>
  147. </xs:annotation>
  148. <xs:attribute name="type" type="phpClassName" use="optional" />
  149. </xs:extension>
  150. </xs:complexContent>
  151. </xs:complexType>
  152. <xs:complexType name="pluginType">
  153. <xs:attribute name="name" type="xs:string" use="required" />
  154. <xs:attribute name="type" type="phpClassName" use="optional" />
  155. <xs:attribute name="disabled" type="xs:boolean" use="optional" />
  156. <xs:attribute name="sortOrder" type="xs:int" use="optional" />
  157. </xs:complexType>
  158. </xs:schema>