@@ -35,8 +35,8 @@ Configuration
35
35
36
36
.. code-block :: php-annotations
37
37
38
- // src/Acme/BlogBundle /Entity/Author.php
39
- namespace Acme\BlogBundle \Entity;
38
+ // src/AppBundle /Entity/Author.php
39
+ namespace AppBundle \Entity;
40
40
41
41
use Symfony\Component\Validator\Constraints as Assert;
42
42
use Symfony\Component\Validator\Context\ExecutionContextInterface;
@@ -56,28 +56,28 @@ Configuration
56
56
57
57
.. code-block :: yaml
58
58
59
- # src/Acme/BlogBundle /Resources/config/validation.yml
60
- Acme\BlogBundle \Entity\Author :
59
+ # src/AppBundle /Resources/config/validation.yml
60
+ AppBundle \Entity\Author :
61
61
constraints :
62
62
- Callback : [validate]
63
63
64
64
.. code-block :: xml
65
65
66
- <!-- src/Acme/BlogBundle /Resources/config/validation.xml -->
66
+ <!-- src/AppBundle /Resources/config/validation.xml -->
67
67
<?xml version =" 1.0" encoding =" UTF-8" ?>
68
68
<constraint-mapping xmlns =" http://symfony.com/schema/dic/constraint-mapping"
69
69
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
70
70
xsi : schemaLocation =" http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd" >
71
71
72
- <class name =" Acme\BlogBundle \Entity\Author" >
72
+ <class name =" AppBundle \Entity\Author" >
73
73
<constraint name =" Callback" >validate</constraint >
74
74
</class >
75
75
</constraint-mapping >
76
76
77
77
.. code-block :: php
78
78
79
- // src/Acme/BlogBundle /Entity/Author.php
80
- namespace Acme\BlogBundle \Entity;
79
+ // src/AppBundle /Entity/Author.php
80
+ namespace AppBundle \Entity;
81
81
82
82
use Symfony\Component\Validator\Mapping\ClassMetadata;
83
83
use Symfony\Component\Validator\Constraints as Assert;
@@ -187,8 +187,8 @@ You can then use the following configuration to invoke this validator:
187
187
188
188
.. code-block :: php-annotations
189
189
190
- // src/Acme/BlogBundle /Entity/Author.php
191
- namespace Acme\BlogBundle \Entity;
190
+ // src/AppBundle /Entity/Author.php
191
+ namespace AppBundle \Entity;
192
192
193
193
use Symfony\Component\Validator\Constraints as Assert;
194
194
@@ -201,20 +201,20 @@ You can then use the following configuration to invoke this validator:
201
201
202
202
.. code-block :: yaml
203
203
204
- # src/Acme/BlogBundle /Resources/config/validation.yml
205
- Acme\BlogBundle \Entity\Author :
204
+ # src/AppBundle /Resources/config/validation.yml
205
+ AppBundle \Entity\Author :
206
206
constraints :
207
207
- Callback : [Vendor\Package\Validator, validate]
208
208
209
209
.. code-block :: xml
210
210
211
- <!-- src/Acme/BlogBundle /Resources/config/validation.xml -->
211
+ <!-- src/AppBundle /Resources/config/validation.xml -->
212
212
<?xml version =" 1.0" encoding =" UTF-8" ?>
213
213
<constraint-mapping xmlns =" http://symfony.com/schema/dic/constraint-mapping"
214
214
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
215
215
xsi : schemaLocation =" http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd" >
216
216
217
- <class name =" Acme\BlogBundle \Entity\Author" >
217
+ <class name =" AppBundle \Entity\Author" >
218
218
<constraint name =" Callback" >
219
219
<value >Vendor\Package\Validator</value >
220
220
<value >validate</value >
@@ -224,8 +224,8 @@ You can then use the following configuration to invoke this validator:
224
224
225
225
.. code-block :: php
226
226
227
- // src/Acme/BlogBundle /Entity/Author.php
228
- namespace Acme\BlogBundle \Entity;
227
+ // src/AppBundle /Entity/Author.php
228
+ namespace AppBundle \Entity;
229
229
230
230
use Symfony\Component\Validator\Mapping\ClassMetadata;
231
231
use Symfony\Component\Validator\Constraints as Assert;
@@ -252,8 +252,8 @@ You can then use the following configuration to invoke this validator:
252
252
When configuring the constraint via PHP, you can also pass a closure to the
253
253
constructor of the Callback constraint::
254
254
255
- // src/Acme/BlogBundle /Entity/Author.php
256
- namespace Acme\BlogBundle \Entity;
255
+ // src/AppBundle /Entity/Author.php
256
+ namespace AppBundle \Entity;
257
257
258
258
use Symfony\Component\Validator\Mapping\ClassMetadata;
259
259
use Symfony\Component\Validator\Constraints as Assert;
0 commit comments