Skip to content

Commit 0ecd341

Browse files
committed
Merge pull request #258 from grunch/master
ob_end_clean() function in "from flat php to symfony2"
2 parents fe243a0 + 770be4e commit 0ecd341

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

book/from_flat_php_to_symfony2.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ incidentally, acts quite a bit like the Symfony2 templating engine:
508508
{
509509
ob_start();
510510
require $path;
511-
$html = ob_end_clean();
511+
$html = ob_get_clean();
512512
513513
return $html;
514514
}
@@ -550,7 +550,7 @@ them for you. Here's the same sample application, now built in Symfony2:
550550
{
551551
public function listAction()
552552
{
553-
$blogs = $this->container->get('doctrine.orm.entity_manager')
553+
$blogs = $this->get('doctrine')->getEntityManager()
554554
->createQuery('SELECT b FROM AcmeBlog:Blog b')
555555
->execute();
556556

@@ -559,7 +559,7 @@ them for you. Here's the same sample application, now built in Symfony2:
559559

560560
public function showAction($id)
561561
{
562-
$blog = $this->container->get('doctrine.orm.entity_manager')
562+
$blog = $this->get('doctrine')->getEntityManager()
563563
->createQuery('SELECT b FROM AcmeBlog:Blog b WHERE id = :id')
564564
->setParameter('id', $id)
565565
->getSingleResult();

0 commit comments

Comments
 (0)