Given a URL string like:
'my-route/{someId}/{someOption}'
I'd like to get an array like:
['someId', 'someOption']
Obviously I can parse it manually with some regexp, but I was wondering if it'd be possible to do it using some Symfony (2.6+) component or something...
So from wherever in my code I can do something like:
$urlParamNames = $someComponent->getParamNamesFromUrl('my-route/{someId}/{someOption}');
NOTE: I know this is not "standard" Symfony, and I know you'll normally get the parameters from the route injected into the action as arguments and so on... Explaining why I want this would be a very long story though, so just assume I need exactly that functionality, no other advices/suggestions...
$someIdand$someOptionas parameters. second, you should be able to extract the parameters with the routing service