3434
3535 .. code-block :: php-annotations
3636
37- // src/Acme/BlogBundle /Entity/Author.php
38- namespace Acme\BlogBundle \Entity;
37+ // src/AppBundle /Entity/Author.php
38+ namespace AppBundle \Entity;
3939
4040 use Symfony\Component\Validator\Constraints as Assert;
4141
@@ -48,21 +48,21 @@ Setup
4848
4949 .. code-block :: yaml
5050
51- # src/Acme/BlogBundle /Resources/config/validation.yml
52- Acme\BlogBundle \Entity\Author :
51+ # src/AppBundle /Resources/config/validation.yml
52+ AppBundle \Entity\Author :
5353 constraints :
5454 - Callback :
5555 methods : [isAuthorValid]
5656
5757 .. code-block :: xml
5858
59- <!-- src/Acme/BlogBundle /Resources/config/validation.xml -->
59+ <!-- src/AppBundle /Resources/config/validation.xml -->
6060 <?xml version =" 1.0" encoding =" UTF-8" ?>
6161 <constraint-mapping xmlns =" http://symfony.com/schema/dic/constraint-mapping"
6262 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
6363 xsi : schemaLocation =" http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd" >
6464
65- <class name =" Acme\BlogBundle \Entity\Author" >
65+ <class name =" AppBundle \Entity\Author" >
6666 <constraint name =" Callback" >
6767 <option name =" methods" >
6868 <value >isAuthorValid</value >
7373
7474 .. code-block :: php
7575
76- // src/Acme/BlogBundle /Entity/Author.php
77- namespace Acme\BlogBundle \Entity;
76+ // src/AppBundle /Entity/Author.php
77+ namespace AppBundle \Entity;
7878
7979 use Symfony\Component\Validator\Mapping\ClassMetadata;
8080 use Symfony\Component\Validator\Constraints as Assert;
@@ -147,12 +147,12 @@ process. Each method can be one of the following formats:
147147
148148 .. code-block :: php-annotations
149149
150- // src/Acme/BlogBundle /Entity/Author.php
150+ // src/AppBundle /Entity/Author.php
151151 use Symfony\Component\Validator\Constraints as Assert;
152152
153153 /**
154154 * @Assert\Callback(methods={
155- * { "Acme\BlogBundle \MyStaticValidatorClass", "isAuthorValid" }
155+ * { "AppBundle \MyStaticValidatorClass", "isAuthorValid" }
156156 * })
157157 */
158158 class Author
@@ -161,26 +161,26 @@ process. Each method can be one of the following formats:
161161
162162 .. code-block :: yaml
163163
164- # src/Acme/BlogBundle /Resources/config/validation.yml
165- Acme\BlogBundle \Entity\Author :
164+ # src/AppBundle /Resources/config/validation.yml
165+ AppBundle \Entity\Author :
166166 constraints :
167167 - Callback :
168168 methods :
169- - [Acme\BlogBundle \MyStaticValidatorClass, isAuthorValid]
169+ - [AppBundle \MyStaticValidatorClass, isAuthorValid]
170170
171171 .. code-block :: xml
172172
173- <!-- src/Acme/BlogBundle /Resources/config/validation.xml -->
173+ <!-- src/AppBundle /Resources/config/validation.xml -->
174174 <?xml version =" 1.0" encoding =" UTF-8" ?>
175175 <constraint-mapping xmlns =" http://symfony.com/schema/dic/constraint-mapping"
176176 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
177177 xsi : schemaLocation =" http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd" >
178178
179- <class name =" Acme\BlogBundle \Entity\Author" >
179+ <class name =" AppBundle \Entity\Author" >
180180 <constraint name =" Callback" >
181181 <option name =" methods" >
182182 <value >
183- <value >Acme\BlogBundle \MyStaticValidatorClass</value >
183+ <value >AppBundle \MyStaticValidatorClass</value >
184184 <value >isAuthorValid</value >
185185 </value >
186186 </option >
@@ -190,7 +190,7 @@ process. Each method can be one of the following formats:
190190
191191 .. code-block :: php
192192
193- // src/Acme/BlogBundle /Entity/Author.php
193+ // src/AppBundle /Entity/Author.php
194194
195195 use Symfony\Component\Validator\Mapping\ClassMetadata;
196196 use Symfony\Component\Validator\Constraints\Callback;
@@ -204,7 +204,7 @@ process. Each method can be one of the following formats:
204204 $metadata->addConstraint(new Callback(array(
205205 'methods' => array(
206206 array(
207- 'Acme\BlogBundle \MyStaticValidatorClass',
207+ 'AppBundle \MyStaticValidatorClass',
208208 'isAuthorValid',
209209 ),
210210 ),
@@ -213,14 +213,14 @@ process. Each method can be one of the following formats:
213213 }
214214
215215 In this case, the static method ``isAuthorValid `` will be called on
216- the ``Acme\BlogBundle \MyStaticValidatorClass `` class. It's passed both
216+ the ``AppBundle \MyStaticValidatorClass `` class. It's passed both
217217 the original object being validated (e.g. ``Author ``) as well as the
218218 ``ExecutionContextInterface ``::
219219
220- namespace Acme\BlogBundle ;
220+ namespace AppBundle ;
221221
222222 use Symfony\Component\Validator\ExecutionContextInterface;
223- use Acme\BlogBundle \Entity\Author;
223+ use AppBundle \Entity\Author;
224224
225225 class MyStaticValidatorClass
226226 {
0 commit comments