title: Symfony 2: Find matching firewall, based on route name
body: <p>My ultimate goal is to check whether a certain route name falls within the secured area of the application.</p>
  
  <p>I am thinking that to achieve that, I should parse security.yml, get the "firewalls" section and go through each firewall trying to match the path of my route name to the pattern of the "secured_area" firewall.</p>
  
  <p>Being new to Symfony2, I tried digging in its source to find how it parses the security.yml itself, but I'm a bit overwhelmed by the number of classes involved in the process.</p>
  
  <p>So, I'm asking for advice:</p>
  
  <ol>
  <li><p>Is this the correct way to approach the problem or is there a more straight forward solution?</p></li>
  <li><p>Any hints on how to write this?</p></li>
  </ol>