title: Symfony - generate url with parameter in controller
body: <p>I want to generate a Url directly in my controller. I want to user a url defined in my routing.yml file that needs a parameter.</p>
  
  <p>I've found that code in the Cookbook (Routage section) :</p>
  
  <pre><code>$params = $router-&gt;match('/blog/my-blog-post');
  // array('slug' =&gt; 'my-blog-post', '_controller' =&gt; 'AcmeBlogBundle:Blog:show')
  
  $uri = $router-&gt;generate('blog_show', array('slug' =&gt; 'my-blog-post'));
  // /blog/my-blog-post
  </code></pre>
  
  <p>But I don't understand to what is refering the $router. Obviously, it doesn't work.
  Is there a simple way to generate a routing url with a paramter in a controller ?</p>