Symfony2: Get Route Path
<p>With the command <code>$this-&gt;generateUrl($route);</code> inside a Controller I can get the URL of the Route.</p>

<p>However, I only want to retrieve the last part of it (as specified in <em>routing.yml</em>).</p>

<p>For example, instead of <code>/web/app_dev.php/$path</code> I just want to return <code>/$path</code></p>

<p>How can I achieve this?</p>