title: Accessing Files Relative to Bundle in Symfony2
body: <p>In a Symfony2 app's routing configuration, I can refer to a file like this:</p>
  
  <pre><code>somepage:
      prefix: someprefix
      resource: "@SomeBundle/Resources/config/config.yml"
  </code></pre>
  
  <p>Is there any way to access a file relative to the bundle within a controller or other PHP code? In particular, I'm trying to use a Symfony\Component\Yaml\Parser object to parse a file, and I don't want to refer to that file absolutely. Essentially, I want to do this:</p>
  
  <pre class="lang-php prettyprint-override"><code>$parser = new Parser();
  $config = $parser-&gt;parse( file_get_contents("@SomeBundle/Resources/config/config.yml") );
  </code></pre>
  
  <p>I've checked out the Symfony\Component\Finder\Finder class, but I don't think that's what I'm looking for. Any ideas? Or maybe I'm completely overlooking a better way of doing this?</p>