In a Symfony2 app\'s routing configuration, I can refer to a file like this:
somepage: prefix: someprefix resource: \"@SomeBundle/Resources/config/co
If you want to do that in a file located in src/.../SomeBundle/... you can use __DIR__ to get the full path of the current file. Then append your Resources/... path to that like
src/.../SomeBundle/...
__DIR__
Resources/...
$foo = __DIR__.'/Resources/config/config.yml';