Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3c71b6d

Browse files
committed
Use AppBundle instead of AcmeDemoBundle
1 parentad14e78 commit3c71b6d

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

‎book/http_fundamentals.rst‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ by adding an entry for ``/contact`` to your routing configuration file:
427427
# app/config/routing.yml
428428
contact:
429429
path:/contact
430-
defaults:{ _controller:AcmeDemoBundle:Main:contact }
430+
defaults:{ _controller:AppBundle:Main:contact }
431431
432432
..code-block::xml
433433
@@ -439,7 +439,7 @@ by adding an entry for ``/contact`` to your routing configuration file:
439439
http://symfony.com/schema/routing/routing-1.0.xsd">
440440
441441
<routeid="contact"path="/contact">
442-
<defaultkey="_controller">AcmeDemoBundle:Main:contact</default>
442+
<defaultkey="_controller">AppBundle:Main:contact</default>
443443
</route>
444444
</routes>
445445
@@ -451,24 +451,18 @@ by adding an entry for ``/contact`` to your routing configuration file:
451451
452452
$collection = new RouteCollection();
453453
$collection->add('contact', new Route('/contact', array(
454-
'_controller' => 'AcmeDemoBundle:Main:contact',
454+
'_controller' => 'AppBundle:Main:contact',
455455
)));
456456
457457
return $collection;
458458
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-
465459
When someone visits the ``/contact`` page, this route is matched, and the
466460
specified controller is executed. As you'll learn in the:doc:`routing chapter</book/routing>`,
467461
the ``AcmeDemoBundle:Main:contact`` string is a short syntax that points to a
468462
specific PHP method ``contactAction`` inside a class called ``MainController``::
469463

470-
// src/Acme/DemoBundle/Controller/MainController.php
471-
namespaceAcme\DemoBundle\Controller;
464+
// src/AppBundle/Controller/MainController.php
465+
namespaceAppBundle\Controller;
472466

473467
use Symfony\Component\HttpFoundation\Response;
474468

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp