ILIAS
Release_4_4_x_branch Revision 61816
|
Public Member Functions | |
__construct () | |
Constructor. | |
isGet () | |
Is this a GET request? | |
isPost () | |
Is this a POST request? | |
isPut () | |
Is this a PUT request? | |
isDelete () | |
Is this a DELETE request? | |
isHead () | |
Is this a HEAD request? | |
isOptions () | |
Is this a OPTIONS request? | |
isAjax () | |
Is this a XHR request? | |
params ($key) | |
Fetch a PUT|POST|GET parameter value. | |
get ($key=null) | |
Fetch GET parameter(s) | |
post ($key=null) | |
Fetch POST parameter(s) | |
put ($key=null) | |
Fetch PUT parameter(s) | |
cookies ($key=null) | |
Fetch COOKIE value(s) | |
headers ($key=null) | |
Get HTTP request header. | |
getBody () | |
Get HTTP request body. | |
getMethod () | |
Get HTTP method. | |
getContentType () | |
Get HTTP request content type. | |
getResourceUri () | |
Get HTTP request resource URI. | |
getRootUri () | |
Get HTTP request root URI. |
Static Public Member Functions | |
static | stripSlashesIfMagicQuotes ($rawData) |
Strip slashes from string or array of strings. |
Data Fields | |
const | METHOD_HEAD = 'HEAD' |
const | METHOD_GET = 'GET' |
const | METHOD_POST = 'POST' |
const | METHOD_PUT = 'PUT' |
const | METHOD_DELETE = 'DELETE' |
const | METHOD_OPTIONS = 'OPTIONS' |
const | METHOD_OVERRIDE = '_METHOD' |
Protected Member Functions | |
arrayOrArrayValue (array &$array, $key=null) | |
Fetch array or array value. | |
arrayValueForKey (array &$array, $key) | |
Fetch value from array. | |
loadPutParameters () | |
Get PUT parameters. | |
loadHttpHeaders () | |
Get HTTP request headers. | |
convertHttpHeaderName ($name) | |
Convert HTTP header name. | |
checkForHttpMethodOverride () | |
Check for HTTP request method override. |
Protected Attributes | |
$method | |
$headers | |
$additionalHeaders = array('content-type', 'content-length', 'php-auth-user', 'php-auth-pw', 'auth-type', 'x-requested-with') | |
$cookies | |
$get | |
$post | |
$put | |
$body | |
$contentType | |
$resource | |
$root |
Definition at line 48 of file Request.php.
Slim_Http_Request::__construct | ( | ) |
Constructor.
Definition at line 121 of file Request.php.
References $_COOKIE, $_GET, $_POST, checkForHttpMethodOverride(), cookies(), Slim_Http_Uri\getBaseUri(), Slim_Http_Uri\getUri(), headers(), loadHttpHeaders(), loadPutParameters(), post(), put(), and stripSlashesIfMagicQuotes().
|
protected |
Fetch array or array value.
array | $array | |
string | $key |
Definition at line 319 of file Request.php.
References arrayValueForKey().
Referenced by cookies(), get(), headers(), post(), and put().
|
protected |
Fetch value from array.
Definition at line 327 of file Request.php.
Referenced by arrayOrArrayValue().
|
protected |
Check for HTTP request method override.
Because traditional web browsers do not support PUT and DELETE HTTP methods, we use a hidden form input field to mimic PUT and DELETE requests. We check for this override here.
Definition at line 395 of file Request.php.
References $post, isPut(), METHOD_OVERRIDE, post(), and put().
Referenced by __construct().
|
protected |
Convert HTTP header name.
Definition at line 382 of file Request.php.
Referenced by headers(), and loadHttpHeaders().
Slim_Http_Request::cookies | ( | $key = null | ) |
Fetch COOKIE value(s)
string | $key | The cookie name |
Definition at line 249 of file Request.php.
References arrayOrArrayValue().
Referenced by __construct().
Slim_Http_Request::get | ( | $key = null | ) |
Fetch GET parameter(s)
string | $key | Name of parameter |
Definition at line 216 of file Request.php.
References arrayOrArrayValue().
Slim_Http_Request::getBody | ( | ) |
Get HTTP request body.
Definition at line 268 of file Request.php.
References $body.
Slim_Http_Request::getContentType | ( | ) |
Get HTTP request content type.
Definition at line 284 of file Request.php.
References $contentType, and headers().
Referenced by loadPutParameters().
Slim_Http_Request::getMethod | ( | ) |
Slim_Http_Request::getResourceUri | ( | ) |
Get HTTP request resource URI.
Definition at line 301 of file Request.php.
References $resource.
Slim_Http_Request::getRootUri | ( | ) |
Get HTTP request root URI.
Definition at line 309 of file Request.php.
References $root.
array Key value array of HTTP request Slim_Http_Request::headers | ( | $key = null | ) |
Get HTTP request header.
string | $key | The header name |
Definition at line 260 of file Request.php.
References arrayOrArrayValue(), and convertHttpHeaderName().
Referenced by __construct(), getContentType(), and isAjax().
Slim_Http_Request::isAjax | ( | ) |
Slim_Http_Request::isDelete | ( | ) |
Is this a DELETE request?
Definition at line 162 of file Request.php.
References METHOD_DELETE.
Slim_Http_Request::isGet | ( | ) |
Is this a GET request?
Definition at line 138 of file Request.php.
References METHOD_GET.
Slim_Http_Request::isHead | ( | ) |
Is this a HEAD request?
Definition at line 170 of file Request.php.
References METHOD_HEAD.
Slim_Http_Request::isOptions | ( | ) |
Is this a OPTIONS request?
Definition at line 178 of file Request.php.
References METHOD_OPTIONS.
Slim_Http_Request::isPost | ( | ) |
Is this a POST request?
Definition at line 146 of file Request.php.
References METHOD_POST.
Slim_Http_Request::isPut | ( | ) |
Is this a PUT request?
Definition at line 154 of file Request.php.
References METHOD_PUT.
Referenced by checkForHttpMethodOverride().
|
protected |
Get HTTP request headers.
Definition at line 366 of file Request.php.
References $headers, and convertHttpHeaderName().
Referenced by __construct().
|
protected |
Get PUT parameters.
Definition at line 348 of file Request.php.
References getContentType().
Referenced by __construct().
Slim_Http_Request::params | ( | $key | ) |
Fetch a PUT|POST|GET parameter value.
The preferred method to fetch the value of a PUT, POST, or GET parameter (searched in that order).
string | $key | The paramter name |
Definition at line 199 of file Request.php.
Referenced by isAjax().
Slim_Http_Request::post | ( | $key = null | ) |
Fetch POST parameter(s)
string | $key | Name of parameter |
Definition at line 227 of file Request.php.
References arrayOrArrayValue().
Referenced by __construct(), and checkForHttpMethodOverride().
Slim_Http_Request::put | ( | $key = null | ) |
Fetch PUT parameter(s)
string | $key | Name of parameter |
Definition at line 238 of file Request.php.
References arrayOrArrayValue().
Referenced by __construct(), and checkForHttpMethodOverride().
|
static |
Strip slashes from string or array of strings.
array | string | $rawData |
Definition at line 336 of file Request.php.
Referenced by __construct().
|
protected |
Definition at line 72 of file Request.php.
|
protected |
Definition at line 98 of file Request.php.
Referenced by getBody().
|
protected |
Definition at line 103 of file Request.php.
Referenced by getContentType().
|
protected |
Definition at line 78 of file Request.php.
|
protected |
Definition at line 83 of file Request.php.
|
protected |
Definition at line 66 of file Request.php.
Referenced by loadHttpHeaders().
|
protected |
Definition at line 61 of file Request.php.
Referenced by getMethod().
|
protected |
Definition at line 88 of file Request.php.
Referenced by checkForHttpMethodOverride().
|
protected |
Definition at line 93 of file Request.php.
|
protected |
Definition at line 108 of file Request.php.
Referenced by getResourceUri().
|
protected |
Definition at line 116 of file Request.php.
Referenced by getRootUri().
const Slim_Http_Request::METHOD_DELETE = 'DELETE' |
Definition at line 54 of file Request.php.
Referenced by Slim\delete(), and isDelete().
const Slim_Http_Request::METHOD_GET = 'GET' |
Definition at line 51 of file Request.php.
Referenced by Slim\get(), and isGet().
const Slim_Http_Request::METHOD_HEAD = 'HEAD' |
Definition at line 50 of file Request.php.
Referenced by Slim\get(), and isHead().
const Slim_Http_Request::METHOD_OPTIONS = 'OPTIONS' |
Definition at line 55 of file Request.php.
Referenced by isOptions(), and Slim\options().
const Slim_Http_Request::METHOD_OVERRIDE = '_METHOD' |
Definition at line 56 of file Request.php.
Referenced by checkForHttpMethodOverride().
const Slim_Http_Request::METHOD_POST = 'POST' |
Definition at line 52 of file Request.php.
Referenced by isPost(), and Slim\post().
const Slim_Http_Request::METHOD_PUT = 'PUT' |
Definition at line 53 of file Request.php.
Referenced by isPut(), and Slim\put().