Stud.IP
6.0
|
Public Member Functions | |
offsetExists ($offset) | |
offsetGet ($offset) | |
offsetSet ($offset, $value) | |
offsetUnset ($offset) | |
getIterator () | |
Static Public Member Functions | |
static | getInstance () |
static | url () |
static | protocol () |
static | server () |
static | path () |
static | scriptName () |
static | pathInfo () |
static | set ($param, $value) |
static | get ($param, $default=NULL) |
static | i18n ($param, $default=NULL, Callable $op=null) |
static | quoted ($param, $default=NULL) |
static | option ($param, $default=NULL) |
static | int ($param, $default=NULL) |
static | float ($param, $default=NULL) |
static | getDateTime ( $param='date', $format='Y-m-d', $second_param=null, $second_format=null, $default=null) |
static | getTime ( $param='time', $format='H:i', $date=null) |
static | username ($param, $default=NULL) |
static | getArray ($param) |
static | quotedArray ($param) |
static | optionArray ($param) |
static | intArray ($param) |
static | floatArray ($param) |
static | bool ($param, $default=null) |
static | boolArray ($param) |
static | usernameArray ($param) |
static | submitted ($param) |
static | submittedSome ($param) |
static | addslashes ($value) |
static | method () |
static | isGet () |
static | isPost () |
static | isPut () |
static | isDelete () |
static | isXhr () |
static | isAjax () |
static | extract ($what) |
static | isDialog () |
static | getObject ($param, $expected_class=null, $allow_null=true) |
static | getManyObjects ($param, $expected_class=null, $allow_null=true) |
Singleton class representing a HTTP request in Stud.IP.
|
static |
Quote a given string or array using addslashes(). If the parameter is an array, the quoting is applied recursively.
mixed | $value | string or array value to be quoted |
|
static |
Return the value of the selected query parameter as a boolean.
string | $param | parameter name |
bool | $default | default value if parameter is not set |
|
static |
Return the value of the selected query parameter as a boolean array.
string | $param | parameter name |
|
static |
extracts some params from request, the desired params must be a comma separated list for each param, the type of used extraction method can be specified after the name, default is get null values are not returned
e.g.: $data = Request::extract('admission_prelim int, admission_binding submitted, admission_prelim_txt'); will yield array(3) { ["admission_prelim"]=> int(1) ["admission_binding"]=> bool(false) ["admission_prelim_txt"]=> string(0) "" }
string | $what | comma separated list of param names and types |
|
static |
Return the value of the selected query parameter as a float.
string | $param | parameter name |
float | $default | default value if parameter is not set |
|
static |
Return the value of the selected query parameter as a float array.
string | $param | parameter name |
|
static |
Return the value of the selected query parameter as a string.
string | $param | parameter name |
string | $default | default value if parameter is not set |
|
static |
Return the value of the selected query parameter as an array.
string | $param | parameter name |
|
static |
Returns the date and time values from one or two fields as a DateTime object. The $second_param and $second_format parameters are handy in case the date and time values come from different fields.
string | $param | The name of the date/time field. |
string | $format | The date format of the date/time field. |
string | $second_param | The name of the second field, if used. This parameter is optional. |
string | $second_format | The time format of the second field, if used. This parameter is optional. |
DateTime | null | $default | Either a default DateTime object or null if no default shall be set. In the latter case a DateTime object representing the unix timestamp 0 is returned. |
|
static |
Return the Request singleton instance.
getIterator | ( | ) |
IteratorAggregate: Create iterator for request parameters.
|
static |
Returns a collection of objects that have previously been serialized using the ObjectBuilder.
String | $param | parameter name |
mixed | $expected_class | Expected class name of objects (optional) |
bool | $allow_null | If true, return empty array on error; otherwise an exception is thrown |
Exception | when an error occurs and $allow_null = false |
|
static |
Returns an object that has previously been serialized using the ObjectBuilder.
String | $param | parameter name |
mixed | $expected_class | Expected class name of object (optional) |
bool | $allow_null | If true, return null on error; otherwise an exception is thrown |
Exception | when an error occurs and $allow_null = false |
|
static |
Retrieves a parameter that stores time data and converts the time data to a DateTime object. If a date is specified using an existing DateTime object, the time will be set on the existing DateTime object and the modified object is returned.
string | $param | The name of the time field. |
string | $format | The time format of the time field. |
DateTime | null | $date | An optional DateTime object whose time shall be set from the specified parameter. |
|
static |
Return the value of the selected query parameter as an I18NString.
string | $param | parameter name |
string | $default | default value if parameter is not set |
Callable | $op | Operation to perform on each text string |
|
static |
Return the value of the selected query parameter as an integer.
string | $param | parameter name |
int | $default | default value if parameter is not set |
|
static |
Return the value of the selected query parameter as an integer array.
string | $param | parameter name |
|
static |
This is an alias of Request::isXhr
|
static |
|
static |
returns true if http header indicates that the response will be rendered as dialog
|
static |
|
static |
|
static |
|
static |
|
static |
Returns the (uppercase) request method.
offsetExists | ( | $offset | ) |
ArrayAccess: Check whether the given offset exists.
offsetGet | ( | $offset | ) |
ArrayAccess: Get the value at the given offset.
offsetSet | ( | $offset, | |
$value | |||
) |
ArrayAccess: Set the value at the given offset.
offsetUnset | ( | $offset | ) |
ArrayAccess: Delete the value at the given offset.
|
static |
Return the value of the selected query parameter as an alphanumeric string (consisting of only digits, letters and underscores).
string | $param | parameter name |
string | $default | default value if parameter is not set |
|
static |
Return the value of the selected query parameter as an array of alphanumeric strings (consisting of only digits, letters and underscores).
string | $param | parameter name |
|
static |
Return the current request path, relative to the server root.
|
static |
Returns the complete path info including duplicated slashes. $_SERVER['PATH_INFO'] will remove them.
|
static |
Return the current protocol ('http' or 'https').
|
static |
Return the value of the selected query parameter as a string. The contents of the string is quoted with addslashes().
string | $param | parameter name |
string | $default | default value if parameter is not set |
|
static |
Return the value of the selected query parameter as a string array. The contents of each element is quoted with addslashes().
string | $param | parameter name |
|
static |
Return the filename of the currently executing script.
|
static |
Return the current server name and port (host:port).
|
static |
Set the selected query parameter to a specific value.
string | $param | parameter name |
mixed | $value | parameter value (string or array) |
|
static |
Check whether a form submit button has been pressed. This works for both image and text submit buttons.
string | $param | submit button name |
|
static |
Check whether one of the form submit buttons has been pressed. This works for both image and text submit buttons.
string | ... a variable argument list of submit button names |
|
static |
Return the current URL, including query parameters.
|
static |
Return the value of the selected query parameter as a string consisting only of allowed characters for usernames.
string | $param | parameter name |
string | $default | default value if parameter is not set |
|
static |
Return the value of the selected query parameter as an array of strings consisting only of allowed characters for usernames.
string | $param | parameter name |