@@ -364,8 +364,7 @@ routes with UTF-8 characters:
364364
365365 .. code-block :: php-annotations
366366
367- // src/AppBundle/Controller/DefaultController.php
368- namespace AppBundle\Controller;
367+ namespace App\Controller;
369368
370369 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
371370 use Symfony\Component\Routing\Annotation\Route;
@@ -375,45 +374,42 @@ routes with UTF-8 characters:
375374 /**
376375 * @Route("/category/{name}", name="route1", options={"utf8": true})
377376 */
378- public function categoryAction ()
377+ public function category ()
379378 {
380379 // ...
381380 }
382381
383382 .. code-block :: yaml
384383
385- # app/config/routing.yml
386384 route1 :
387385 path : /category/{name}
388- defaults : { _controller: 'AppBundle:Default :category' }
386+ defaults : { _controller: 'App\Controller\DefaultController: :category' }
389387 options :
390388 utf8 : true
391389
392390 .. code-block :: xml
393391
394- <!-- app/config/routing.xml -->
395392 <?xml version =" 1.0" encoding =" UTF-8" ?>
396393 <routes xmlns =" http://symfony.com/schema/routing"
397394 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
398395 xsi : schemaLocation =" http://symfony.com/schema/routing
399396 http://symfony.com/schema/routing/routing-1.0.xsd" >
400397
401398 <route id =" route1" path =" /category/{name}" >
402- <default key =" _controller" >AppBundle:Default :category</default >
399+ <default key =" _controller" >App\Controller\DefaultController: :category</default >
403400 <option key =" utf8" >true</option >
404401 </route >
405402 </routes >
406403
407404 .. code-block :: php
408405
409- // app/config/routing.php
410406 use Symfony\Component\Routing\RouteCollection;
411407 use Symfony\Component\Routing\Route;
412408
413409 $collection = new RouteCollection();
414410 $collection->add('route1', new Route('/category/{name}',
415411 array(
416- '_controller' => 'AppBundle:Default :category',
412+ '_controller' => 'App\Controller\DefaultController: :category',
417413 ),
418414 array(),
419415 array(
@@ -438,8 +434,7 @@ You can also include UTF-8 strings as routing requirements:
438434
439435 .. code-block :: php-annotations
440436
441- // src/AppBundle/Controller/DefaultController.php
442- namespace AppBundle\Controller;
437+ namespace App\Controller;
443438
444439 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
445440 use Symfony\Component\Routing\Annotation\Route;
@@ -454,48 +449,45 @@ You can also include UTF-8 strings as routing requirements:
454449 * options={"utf8": true}
455450 * )
456451 */
457- public function defaultAction ()
452+ public function default ()
458453 {
459454 // ...
460455 }
461456
462457 .. code-block :: yaml
463458
464- # app/config/routing.yml
465459 route2 :
466460 path : /default/{default}
467- defaults : { _controller: 'AppBundle:Default :default' }
461+ defaults : { _controller: 'App\Controller\DefaultController: :default' }
468462 requirements :
469463 default : " 한국어"
470464 options :
471465 utf8 : true
472466
473467 .. code-block :: xml
474468
475- <!-- app/config/routing.xml -->
476469 <?xml version =" 1.0" encoding =" UTF-8" ?>
477470 <routes xmlns =" http://symfony.com/schema/routing"
478471 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
479472 xsi : schemaLocation =" http://symfony.com/schema/routing
480473 http://symfony.com/schema/routing/routing-1.0.xsd" >
481474
482475 <route id =" route2" path =" /default/{default}" >
483- <default key =" _controller" >AppBundle:Default :default</default >
476+ <default key =" _controller" >App\Controller\DefaultController: :default</default >
484477 <requirement key =" default" >한국어</requirement >
485478 <option key =" utf8" >true</option >
486479 </route >
487480 </routes >
488481
489482 .. code-block :: php
490483
491- // app/config/routing.php
492484 use Symfony\Component\Routing\RouteCollection;
493485 use Symfony\Component\Routing\Route;
494486
495487 $collection = new RouteCollection();
496488 $collection->add('route2', new Route('/default/{default}',
497489 array(
498- '_controller' => 'AppBundle:Default :default',
490+ '_controller' => 'App\Controller\DefaultController: :default',
499491 ),
500492 array(
501493 'default' => '한국어',
0 commit comments