Skip to content

Commit e1133d1

Browse files
Adding missing method
1 parent 2191ece commit e1133d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/routing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,13 +1067,13 @@ a route+parameters back to a URL. The
10671067
:method:`Symfony\\Component\\Routing\\Router::generate` methods form this bi-directional
10681068
system. Take the ``blog_show`` example route from earlier::
10691069

1070-
$params = $this->('router')->match('/blog/my-blog-post');
1070+
$params = $this->get('router')->match('/blog/my-blog-post');
10711071
// array(
10721072
// 'slug' => 'my-blog-post',
10731073
// '_controller' => 'AcmeBlogBundle:Blog:show',
10741074
// )
10751075

1076-
$uri = $this->('router')->generate('blog_show', array('slug' => 'my-blog-post'));
1076+
$uri = $this->get('router')->generate('blog_show', array('slug' => 'my-blog-post'));
10771077
// /blog/my-blog-post
10781078

10791079
To generate a URL, you need to specify the name of the route (e.g. ``blog_show``)

0 commit comments

Comments
 (0)