symfony/symfony — Issue #2495: [Router] Add a way to retrieve parameters for the current route
Author: schmittjoh
Created: 2011-10-27 10:05:03+00:00
State: open

It would be nice to have a way to retrieve the parameters which were used by the current route. Right now, they are added to the Request's attributes, but you have no way to tell whether an attribute belongs to the route or is coming from a different source. We could add a separate attribute "_route_params" in addition to merging them.

This could for example be used by language switchers to generate routes for a different locale.