php - Define post parameters using annotations - Symfony2 -


i have controller on project built on top of symfony2 , know if there way define post method parameters using method annotations how can method parameters.

i'm not talking url parameters - i'm talking naming the payload parameters automatically assigned method parameters.

/**  * @route("/path/{parameter}")  * @method("get")  */ public function mymethod($parameter){ }  /**  * @route("/path/")  * @method("post")  * @parameter("parameter") <--- this.  */ public function mymethod($parameter){ } 

is feasible sensio bundle or support url parameters?

thank you.

the automatic injection of route placeholders (not get/post parameters!) done symfony framework, has nothing symfony framework.

when parameter name matches route attribute name, it'll injected. doesn't work neither post nor parameters. however, can create own parameter converter (feature of sensioframeworkextrabundle) make yourself.


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -