Line 36 | Line 36 |
---|
* other methods this class provides. Using this function should be avoided if possible! It will * consume twice the the amount of memory of the value *
|
* other methods this class provides. Using this function should be avoided if possible! It will * consume twice the the amount of memory of the value *
|
* @param string $var_name The name of the variable that shall be overwritten * @param mixed $value The value which the variable shall contain. * If this is null the variable will be unset. * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global * Specifies which super global shall be changed
| * @param string $var_name The name of the variable that shall be overwritten * @param mixed $value The value which the variable shall contain. * If this is null the variable will be unset. * @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) * Specifies which super global shall be changed
|
*/ public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST);
| */ public function overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST);
|
Line 56 | Line 56 |
---|
* This function will always return a value of the same type as the default. * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
* This function will always return a value of the same type as the default. * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
|
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global * Specifies which super global should be used
| * @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) * Specifies which super global shall be changed
|
* * @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the * the same as that of $default. If the variable is not set $default is returned.
| * * @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the * the same as that of $default. If the variable is not set $default is returned.
|
Line 78 | Line 78 |
---|
* then specifying array("var", 1) as the name will return "a". * @param mixed $default A default value that is returned if the variable was not set. * This function will always return a value of the same type as the default.
|
* then specifying array("var", 1) as the name will return "a". * @param mixed $default A default value that is returned if the variable was not set. * This function will always return a value of the same type as the default.
|
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global * Specifies which super global should be used
| * @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) * Specifies which super global shall be changed
|
* * @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the * the same as that of $default. If the variable is not set $default is returned.
| * * @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the * the same as that of $default. If the variable is not set $default is returned.
|
Line 122 | Line 122 |
---|
* Checks whether a certain variable is set in one of the super global * arrays. *
|
* Checks whether a certain variable is set in one of the super global * arrays. *
|
* @param string $var Name of the variable * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global * Specifies the super global which shall be checked
| * @param string $var Name of the variable * @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) * Specifies which super global shall be changed
|
*
|
*
|
* @return bool True if the variable was sent as input
| * @return bool True if the variable was sent as input
|
*/ public function is_set($var, $super_global = \phpbb\request\request_interface::REQUEST);
| */ public function is_set($var, $super_global = \phpbb\request\request_interface::REQUEST);
|
Line 147 | Line 147 |
---|
/** * Returns all variable names for a given super global *
|
/** * Returns all variable names for a given super global *
|
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global * The super global from which names shall be taken
| * @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) * The super global from which names shall be taken
|
* * @return array All variable names that are set for the super global. * Pay attention when using these, they are unsanitised!
| * * @return array All variable names that are set for the super global. * Pay attention when using these, they are unsanitised!
|
Line 158 | Line 158 |
---|
/** * Returns the original array of the requested super global *
|
/** * Returns the original array of the requested super global *
|
* @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global * The super global which will be returned
| * @param string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) * The super global which will be returned
|
* * @return array The original array of the requested super global. */
| * * @return array The original array of the requested super global. */
|