title: Finding Route in specific Bundle
body: <p>I am implementing a web app using symfony 2. It has a main page that is served through a "CoreBundle" which loads up the contents of other app bundles within a div. To handle this, I want to have the CoreBundle route catch all routes and then forward the request to the app bundles in order to get the content within the div.</p>
  
  <p>the route is:</p>
  
  <pre><code>@Route("{app_name}/{garbage}", name="_core_app_garbage", requirement={"garbage"=".*"})
  </code></pre>
  
  <p>This works great. It captures all routes with $app_name set to the name of the app (the first subdirectory), and the rest of the uri inside $garbage.</p>
  
  <p>My problem is trying to find the route for $garbage within the specific app. The core bundle has knowledge of the bundle name for the app.</p>
  
  <p>So far I have tried the following two things:</p>
  
  <ol>
  <li><p>Use the router service to find the route but trying to remove the catch all route:</p>
  
  <pre><code>$router-&gt;getRouteCollection()-&gt;remove("_core_app_garbage");
  </code></pre>
  
  <p>That doesn't seem to change anything (the route I get back is still the catch all).</p></li>
  <li><p>Creating my own router. I tried various configurations but it seems to take a lot of class creations and specific class creations ( AnnotationDirectoryLoader in my case ). That seems overly difficult to what I am used to with Symfony and it is not portable if I decide to change the routing format (to YAML for example).</p></li>
  </ol>
  
  <p>Is there a quick and easy way to do this?</p>