@@ -427,7 +427,7 @@ by adding an entry for ``/contact`` to your routing configuration file:
427
427
# app/config/routing.yml
428
428
contact :
429
429
path : /contact
430
- defaults : { _controller: AcmeDemoBundle :Main:contact }
430
+ defaults : { _controller: AppBundle :Main:contact }
431
431
432
432
.. code-block :: xml
433
433
@@ -439,7 +439,7 @@ by adding an entry for ``/contact`` to your routing configuration file:
439
439
http://symfony.com/schema/routing/routing-1.0.xsd" >
440
440
441
441
<route id =" contact" path =" /contact" >
442
- <default key =" _controller" >AcmeDemoBundle :Main:contact</default >
442
+ <default key =" _controller" >AppBundle :Main:contact</default >
443
443
</route >
444
444
</routes >
445
445
@@ -451,24 +451,18 @@ by adding an entry for ``/contact`` to your routing configuration file:
451
451
452
452
$collection = new RouteCollection();
453
453
$collection->add('contact', new Route('/contact', array(
454
- '_controller' => 'AcmeDemoBundle :Main:contact',
454
+ '_controller' => 'AppBundle :Main:contact',
455
455
)));
456
456
457
457
return $collection;
458
458
459
- .. note ::
460
-
461
- This example uses :doc: `YAML </components/yaml/yaml_format >` to define the routing
462
- configuration. Routing configuration can also be written in other formats
463
- such as XML or PHP.
464
-
465
459
When someone visits the ``/contact `` page, this route is matched, and the
466
460
specified controller is executed. As you'll learn in the :doc: `routing chapter </book/routing >`,
467
461
the ``AcmeDemoBundle:Main:contact `` string is a short syntax that points to a
468
462
specific PHP method ``contactAction `` inside a class called ``MainController ``::
469
463
470
- // src/Acme/DemoBundle /Controller/MainController.php
471
- namespace Acme\DemoBundle \Controller;
464
+ // src/AppBundle /Controller/MainController.php
465
+ namespace AppBundle \Controller;
472
466
473
467
use Symfony\Component\HttpFoundation\Response;
474
468
0 commit comments