Skip to content

Commit

Permalink
Updated to use AppBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Nov 5, 2014
1 parent b735642 commit c8f5ad5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions book/from_flat_php_to_symfony2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,8 @@ from scratch, you could at least use Symfony's standalone `Routing`_ and
Instead of re-solving common problems, you can let Symfony take care of
them for you. Here's the same sample application, now built in Symfony::

// src/Acme/BlogBundle/Controller/BlogController.php
namespace Acme\BlogBundle\Controller;
// src/AppBundle/Controller/BlogController.php
namespace AppBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

Expand All @@ -571,7 +571,7 @@ them for you. Here's the same sample application, now built in Symfony::
{
$post = $this->get('doctrine')
->getManager()
->getRepository('AcmeBlogBundle:Post')
->getRepository('AppBundle:Post')
->find($id);

if (!$post) {
Expand Down Expand Up @@ -644,11 +644,11 @@ A routing configuration map provides this information in a readable format:
# app/config/routing.yml
blog_list:
path: /blog
defaults: { _controller: AcmeBlogBundle:Blog:list }
defaults: { _controller: AppBundle:Blog:list }
blog_show:
path: /blog/show/{id}
defaults: { _controller: AcmeBlogBundle:Blog:show }
defaults: { _controller: AppBundle:Blog:show }
Now that Symfony is handling all the mundane tasks, the front controller
is dead simple. And since it does so little, you'll never have to touch
Expand Down

0 comments on commit c8f5ad5

Please sign in to comment.