Request Handler

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.


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.

Thanks Y!!