I hope I may ask this question without going into the details of why I need to do this,
I have a route
/**
* @Route("/edit/{id}", name="my_edit_route")
*/
public function editAction()
{ /* ....... */ }
And now at some other point in time, I have a URL which was generated with this route (I only have the string, no other information is available). The string looks like this
/edit/23
Is there anyway in Symfony2, that I can provide the route name (e.g. "my_edit_route" and this URL string, and have Symfony extract the parameters. (e.g. the id=23)
p.s. I know this could be done with regex or other tools, but my actual routes in my application are more complex.
I am sure this should not be to difficult for Symfony2 to do, as it already does this each time it extracts the parameters from your URL to handle a request.