|
26 | 26 | </xs:complexType> |
27 | 27 | </xs:redefine> |
28 | 28 |
|
| 29 | + <xs:simpleType name="phpFqcn"> |
| 30 | + <xs:annotation> |
| 31 | + <xs:documentation> |
| 32 | + A string that matches a Fully Qualified Class Name from PHP, especially not starting |
| 33 | + with a backslash as this is an invalid character to start a class name with but a |
| 34 | + somewhat common mistake so this simple type can be used to validate against it |
| 35 | + already |
| 36 | + </xs:documentation> |
| 37 | + </xs:annotation> |
| 38 | + <xs:restriction base="xs:string"> |
| 39 | + <xs:pattern value="([a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*)(\\[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*)*"/> |
| 40 | + </xs:restriction> |
| 41 | + </xs:simpleType> |
| 42 | + |
29 | 43 | <xs:complexType name="init_parameter"> |
30 | 44 | <xs:complexContent> |
31 | 45 | <xs:extension base="argumentType" /> |
|
102 | 116 | Preference help Object Manager to choose class for corresponding interface |
103 | 117 | </xs:documentation> |
104 | 118 | </xs:annotation> |
105 | | - <xs:attribute name="for" type="xs:string" use="required" /> |
106 | | - <xs:attribute name="type" type="xs:string" use="required" /> |
| 119 | + <xs:attribute name="for" type="phpFqcn" use="required"/> |
| 120 | + <xs:attribute name="type" type="phpFqcn" use="required" /> |
107 | 121 | </xs:complexType> |
108 | 122 |
|
109 | 123 | <xs:complexType name="typeType"> |
|
121 | 135 | </xs:element> |
122 | 136 | <xs:element name="plugin" type="pluginType" minOccurs="0" maxOccurs="unbounded" /> |
123 | 137 | </xs:choice> |
124 | | - <xs:attribute name="name" type="xs:string" use="required" /> |
| 138 | + <xs:attribute name="name" type="phpFqcn" use="required" /> |
125 | 139 | <xs:attribute name="shared" type="xs:boolean" use="optional" /> |
126 | 140 | </xs:complexType> |
127 | 141 |
|
|
133 | 147 | With 'virtualType' tag you can point parameters and plugins for autogenerated class |
134 | 148 | </xs:documentation> |
135 | 149 | </xs:annotation> |
136 | | - <xs:attribute name="type" type="xs:string" use="optional" /> |
| 150 | + <xs:attribute name="type" type="phpFqcn" use="optional" /> |
137 | 151 | </xs:extension> |
138 | 152 | </xs:complexContent> |
139 | 153 | </xs:complexType> |
140 | 154 |
|
141 | 155 | <xs:complexType name="pluginType"> |
142 | 156 | <xs:attribute name="name" type="xs:string" use="required" /> |
143 | | - <xs:attribute name="type" type="xs:string" use="optional" /> |
| 157 | + <xs:attribute name="type" type="phpFqcn" use="optional" /> |
144 | 158 | <xs:attribute name="disabled" type="xs:boolean" use="optional" /> |
145 | 159 | <xs:attribute name="sortOrder" type="xs:int" use="optional" /> |
146 | 160 | </xs:complexType> |
|
0 commit comments