Is there are way to get current matched route configuration parameters in a controller (in Symfony2)?
Basically what I need to know is:
I have my route.yml file (for example):
my_app_route:
pattern: /app/route
defaults: { _controller: "MyAppBundle:Default:index", _format: json }
requirements: { _method: post|put }
I want to be able to get these parameter values in controller. Not request parameters, but configuration parameter of a matching route (for a current Request). When I have a request that matching this route, I want to get _method (post|put) of this matching request.
Can anyone help me with this? Thanks.