I'm writing an extension of url_for
which will check that the logged in user has the appropriate credentials to access a link to a route before rendering said link.
I have determined how to get the Action from module/action strings, and successfully check the credentials required. But I can't find a reliable way to get the appropriate Action from the name of the route, whether a named route or one derived from pattern matching e.g.
home/index => module: home, action: index
@home => module: home, action: index
I suspect I need to copy code from sfRouting, as I can't find a public method in Symfony to do this. Is there a better way?