ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Public Member Functions | |
__construct () | |
Constructor. More... | |
isGet () | |
Is this a GET request? More... | |
isPost () | |
Is this a POST request? More... | |
isPut () | |
Is this a PUT request? More... | |
isDelete () | |
Is this a DELETE request? More... | |
isHead () | |
Is this a HEAD request? More... | |
isOptions () | |
Is this a OPTIONS request? More... | |
isAjax () | |
Is this a XHR request? More... | |
params ( $key) | |
Fetch a PUT|POST|GET parameter value. More... | |
get ( $key=null) | |
Fetch GET parameter(s) More... | |
post ( $key=null) | |
Fetch POST parameter(s) More... | |
put ( $key=null) | |
Fetch PUT parameter(s) More... | |
cookies ( $key=null) | |
Fetch COOKIE value(s) More... | |
headers ( $key=null) | |
Get HTTP request header. More... | |
getBody () | |
Get HTTP request body. More... | |
getMethod () | |
Get HTTP method. More... | |
getContentType () | |
Get HTTP request content type. More... | |
getResourceUri () | |
Get HTTP request resource URI. More... | |
getRootUri () | |
Get HTTP request root URI. More... | |
Static Public Member Functions | |
static | stripSlashesIfMagicQuotes ( $rawData) |
Strip slashes from string or array of strings. More... | |
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. More... | |
arrayValueForKey (array &$array, $key) | |
Fetch value from array. More... | |
loadPutParameters () | |
Get PUT parameters. More... | |
loadHttpHeaders () | |
Get HTTP request headers. More... | |
convertHttpHeaderName ( $name) | |
Convert HTTP header name. More... | |
checkForHttpMethodOverride () | |
Check for HTTP request method override. More... | |
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, $_SERVER, checkForHttpMethodOverride(), cookies(), Slim_Http_Uri\getBaseUri(), Slim_Http_Uri\getUri(), headers(), loadHttpHeaders(), loadPutParameters(), post(), and put().
|
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.
References string.
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(), 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, $header, 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.
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 | ( | ) |
Is this a XHR request?
Definition at line 186 of file Request.php.
References headers(), and params().
Slim_Http_Request::isDelete | ( | ) |
Slim_Http_Request::isGet | ( | ) |
Slim_Http_Request::isHead | ( | ) |
Slim_Http_Request::isOptions | ( | ) |
Slim_Http_Request::isPost | ( | ) |
Slim_Http_Request::isPut | ( | ) |
Is this a PUT request?
Definition at line 154 of file Request.php.
Referenced by checkForHttpMethodOverride().
|
protected |
Get HTTP request headers.
Definition at line 366 of file Request.php.
References $_SERVER, $headers, array, and convertHttpHeaderName().
Referenced by __construct().
|
protected |
Get PUT parameters.
Definition at line 348 of file Request.php.
References $output, array, and 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.
References array.
|
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().
const Slim_Http_Request::METHOD_GET = 'GET' |
Definition at line 51 of file Request.php.
Referenced by Slim\get().
const Slim_Http_Request::METHOD_HEAD = 'HEAD' |
Definition at line 50 of file Request.php.
Referenced by Slim\get().
const Slim_Http_Request::METHOD_OPTIONS = 'OPTIONS' |
Definition at line 55 of file Request.php.
Referenced by Slim\options().
const Slim_Http_Request::METHOD_OVERRIDE = '_METHOD' |
Definition at line 56 of file Request.php.
const Slim_Http_Request::METHOD_POST = 'POST' |
Definition at line 52 of file Request.php.
Referenced by Slim\post().
const Slim_Http_Request::METHOD_PUT = 'PUT' |
Definition at line 53 of file Request.php.
Referenced by Slim\put().