This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

$request->request->... ?!

Requests for new symfony features.

$request->request->... ?!

by rihad » Sun Oct 23, 2011 9:11 am

Why aren't HTTP POST fields stored in $request->post->... ? A very unfortunate decision. $request->request should probably have been the merge of GPC values to match how it's done in PHP $_REQUEST.
rihad
Faithful Member
 
Posts: 227
Joined: Sat May 05, 2007 1:39 pm

Re: $request->request->... ?!

by bjo3rn » Sat Nov 26, 2011 7:10 pm

Maybe because a request variable is technically independent from the request type whereas the request method is either POST, GET or whatever. Can you give an example that would show the benefit of seperated variables?

Björn
User avatar
bjo3rn
Faithful Member
 
Posts: 1245
Joined: Fri Jun 17, 2011 10:03 am
Location: Germany

Re: $request->request->... ?!

by rihad » Sat Nov 26, 2011 7:25 pm

Because request->request is a misnomer for solely POST data. It should be request->post. As to the GET/POST data piled in a single variable (as in PHP $_REQUEST), it's fragile as well since it depends on the GPC order. A POST request having foo=bar for the URL http://example.com?foo=xyzzy will set $_REQUEST['foo'] to either bar or xyzzy, depending on that.
rihad
Faithful Member
 
Posts: 227
Joined: Sat May 05, 2007 1:39 pm

Re: $request->request->... ?!

by bjo3rn » Sun Nov 27, 2011 1:21 pm

Ah, I see. Thanks for explaining.
User avatar
bjo3rn
Faithful Member
 
Posts: 1245
Joined: Fri Jun 17, 2011 10:03 am
Location: Germany