Yii Framework Forum: Request Handler - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Request Handler Object to handle raw request data Rate Topic: -----

#1 User is offline   benrowe 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 23-March 10

Posted 23 March 2010 - 11:10 PM

I've noticed in all the examples that the controller actions all access $_POST, $_GET directly. Is this the norm for yii? or is there a object that will handle the processing of the the request data?

I've tried looking though the documentation and couldn't find any reference of such an object.

Thanks!
0

#2 User is offline   Y!! 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 978
  • Joined: 18-June 09

Posted 24 March 2010 - 01:28 AM

Hi, the Yii request object supports this: gerParam(), getPost(), getQuery()

You may use $_GET directly when you know the param you are trying to access is present (for example defined in an url-rule). It's your choice in the end.
0

#3 User is offline   benrowe 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 23-March 10

Posted 25 March 2010 - 07:24 PM

Thanks Y!!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users