diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2013-09-27 15:55:22 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2013-10-01 20:13:13 +0200 |
commit | 36d1156cf8fbd340ecfcc9d9a06e69004acfe154 (patch) | |
tree | 2ade448feea887b04c82986584609b2ba6b1b51c /lib | |
parent | cd2e1d0cfe69dbebfd2c30876987586026ffbea8 (diff) | |
download | nextcloud-server-36d1156cf8fbd340ecfcc9d9a06e69004acfe154.tar.gz nextcloud-server-36d1156cf8fbd340ecfcc9d9a06e69004acfe154.zip |
Add interface docs to IRequest.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/irequest.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/public/irequest.php b/lib/public/irequest.php index 9f335b06f2a..5611180473d 100644 --- a/lib/public/irequest.php +++ b/lib/public/irequest.php @@ -22,6 +22,28 @@ 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 { |