@@ -9,7 +9,7 @@ with Doctrine Resolve Target Entity Listener option).
9
9
10
10
Example:
11
11
12
- ``` yml
12
+ ``` yaml
13
13
namespaces :
14
14
entity : " Dunglas\E commerceBundle\E ntity"
15
15
enum : " Dunglas\E commerceBundle\E num"
@@ -20,7 +20,7 @@ Namespaces can also be specified for a specific type. It will take precedence ov
20
20
21
21
Example:
22
22
23
- ` ` ` yml
23
+ ` ` ` yaml
24
24
types :
25
25
Thing :
26
26
namespaces :
@@ -37,7 +37,7 @@ Schema.org definition).
37
37
38
38
Example :
39
39
40
- ` ` ` yml
40
+ ` ` ` yaml
41
41
types:
42
42
Brand:
43
43
properties:
@@ -61,7 +61,7 @@ Cardinalities are enforced by the class generator, the Doctrine ORM generator an
61
61
62
62
Example :
63
63
64
- ` ` ` yml
64
+ ` ` ` yaml
65
65
types:
66
66
Product:
67
67
properties:
@@ -75,7 +75,7 @@ Override the guessed class hierarchy of a given type with this option.
75
75
76
76
Example :
77
77
78
- ` ` ` yml
78
+ ` ` ` yaml
79
79
ImageObject:
80
80
parent: Thing # Force the parent to be Thing instead of CreativeWork > MediaObject
81
81
properties: ~
@@ -89,7 +89,7 @@ Add a `@author` PHPDoc annotation to class' DocBlock.
89
89
90
90
Example :
91
91
92
- ` ` ` yml
92
+ ` ` ` yaml
93
93
author: "Kévin Dunglas <[email protected] >"
94
94
` ` `
95
95
@@ -99,7 +99,7 @@ By default, all generators are enabled. You can specify the list of generators t
99
99
100
100
Example (enabling only the PHPDoc generator) :
101
101
102
- ` ` ` yml
102
+ ` ` ` yaml
103
103
annotationGenerators:
104
104
- SchemaOrgModel\A nnotationGenerator\P hpDocAnnotationGenerator
105
105
` ` `
@@ -110,7 +110,7 @@ useful when creating your own generators.
110
110
111
111
Enabling a custom generator and the PHPDoc generator :
112
112
113
- ` ` ` yml
113
+ ` ` ` yaml
114
114
annotationGenerators:
115
115
- SchemaOrgModel\A nnotationGenerator\P hpDocAnnotationGenerator
116
116
- Acme\G enerators\M yGenerator
@@ -122,7 +122,7 @@ By default, the generator add a property called `id` not provided by Schema.org.
122
122
with an ORM or an ODM.
123
123
This behavior can be disabled with the following setting :
124
124
125
- ` ` ` yml
125
+ ` ` ` yaml
126
126
generateId: false
127
127
` ` `
128
128
@@ -132,8 +132,9 @@ By default, the generator use classes provided by the [Doctrine Collections](htt
132
132
to store collections of entities. This is useful (and required) when using Doctrine ORM or Doctrine ODM.
133
133
This behavior can be disabled (to fallback to standard arrays) with the following setting :
134
134
135
- ` ` ` yml
136
- useDoctrineCollection: false
135
+ ` ` ` yaml
136
+ doctrine:
137
+ useCollection: false
137
138
` ` `
138
139
139
140
# # Custom field visibility
@@ -143,7 +144,7 @@ The default visibility can be changed with the `fieldVisibility` otion.
143
144
144
145
Example :
145
146
146
- ` ` ` yml
147
+ ` ` ` yaml
147
148
fieldVisibility: "protected"
148
149
` ` `
149
150
@@ -154,7 +155,7 @@ The standard behavior of the generator is to use the `@MappedSuperclass` Doctrin
154
155
155
156
The inheritance annotation can be forced for a given type like the following :
156
157
157
- ` ` ` yml
158
+ ` ` ` yaml
158
159
types:
159
160
Product:
160
161
doctrine:
@@ -172,6 +173,12 @@ mappings.
172
173
If you set the option `useInterface` to true, the generator will generate an interface corresponding to each generated
173
174
entity and will use them in relation mappings.
174
175
176
+ To let PHP Schema generating the XML mapping file usable with Symfony add the following to your config file :
177
+
178
+ ` ` ` yaml
179
+ doctrine:
180
+ resolveTargetEntityConfigPath: path/to/doctrine.xml
181
+ ` ` `
175
182
176
183
# # Custom schemas
177
184
@@ -181,7 +188,7 @@ to generate the PHP data model of your application.
181
188
182
189
Example :
183
190
184
- ` ` ` yml
191
+ ` ` ` yaml
185
192
rdfa:
186
193
- https://raw.githubusercontent.com/rvguha/schemaorg/master/data/schema.rdfa # Experimental version of Schema.org
187
194
- http://example.com/data/myschema.rfa # Additional types
@@ -202,7 +209,7 @@ Prepend all generated PHP files with a custom comment.
202
209
203
210
Example :
204
211
205
- ` ` ` yml
212
+ ` ` ` yaml
206
213
header: |
207
214
/*
208
215
* This file is part of the Ecommerce package.
@@ -222,7 +229,7 @@ header: |
222
229
rdfa:
223
230
224
231
# Default:
225
- - https ://raw.githubusercontent.com/rvguha/schemaorg/master/data/schema.rdfa
232
+ - http ://schema.org/docs/schema_org_rdfa.html
226
233
227
234
# OWL relation files to use
228
235
relations:
@@ -239,9 +246,6 @@ generateId: true
239
246
# Generate interfaces and use Doctrine's Resolve Target Entity feature
240
247
useInterface: false
241
248
242
- # Use Doctrine's ArrayCollection instead of standard arrays
243
- useDoctrineCollection: true
244
-
245
249
# Emit a warning if a property is not derived from GoodRelations
246
250
checkIsGoodRelations: false
247
251
@@ -260,6 +264,15 @@ namespaces:
260
264
# The namespace of the generated interfaces
261
265
interface: SchemaOrg\M odel # Example: Acme\M odel
262
266
267
+ # Doctrine
268
+ doctrine:
269
+
270
+ # Use Doctrine's ArrayCollection instead of standard arrays
271
+ useCollection: true
272
+
273
+ # The Resolve Target Entity Listener config file pass
274
+ resolveTargetEntityConfigPath: null
275
+
263
276
# The value of the phpDoc's @author annotation
264
277
author: false # Example: Kévin Dunglas <[email protected] >
265
278
0 commit comments