Add interface docs to IRequest.

This commit is contained in:
Thomas Tanghus 2013-09-27 15:55:22 +02:00
parent 35fae7aaf8
commit 2115db3892
1 changed files with 22 additions and 0 deletions

View File

@ -22,6 +22,28 @@
namespace OCP; namespace OCP;
/**
* This interface provides an immutable object with with accessors to
* request variables and headers.
*
* Access request variables by method and name.
*
* Examples:
*
* $request->post['myvar']; // Only look for POST variables
* $request->myvar; or $request->{'myvar'}; or $request->{$myvar}
* Looks in the combined GET, POST and urlParams array.
*
* If you access e.g. ->post but the current HTTP request method
* is GET a \LogicException will be thrown.
*
* NOTE:
* - When accessing ->put a stream resource is returned and the accessor
* will return false on subsequent access to ->put or ->patch.
* - When accessing ->patch and the Content-Type is either application/json
* or application/x-www-form-urlencoded (most cases) it will act like ->get
* and ->post and return an array. Otherwise the raw data will be returned.
*/
interface IRequest { interface IRequest {