@@ -39,7 +39,7 @@ class request implements \phpbb\request\request_interface
39
39
protected $ original_request = null ;
40
40
41
41
/**
42
- * @var
42
+ * @var bool
43
43
*/
44
44
protected $ super_globals_disabled = false ;
45
45
@@ -137,11 +137,11 @@ public function enable_super_globals()
137
137
* other methods this class provides. Using this function should be avoided if possible! It will
138
138
* consume twice the the amount of memory of the value
139
139
*
140
- * @param string $var_name The name of the variable that shall be overwritten
141
- * @param mixed $value The value which the variable shall contain.
142
- * If this is null the variable will be unset.
143
- * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
144
- * Specifies which super global shall be changed
140
+ * @param string $var_name The name of the variable that shall be overwritten
141
+ * @param mixed $value The value which the variable shall contain.
142
+ * If this is null the variable will be unset.
143
+ * @param string $super_global ( \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
144
+ * Specifies which super global shall be changed
145
145
*/
146
146
public function overwrite ($ var_name , $ value , $ super_global = \phpbb \request \request_interface::REQUEST )
147
147
{
@@ -173,16 +173,16 @@ public function overwrite($var_name, $value, $super_global = \phpbb\request\requ
173
173
* Central type safe input handling function.
174
174
* All variables in GET or POST requests should be retrieved through this function to maximise security.
175
175
*
176
- * @param string|array $var_name The form variable's name from which data shall be retrieved.
177
- * If the value is an array this may be an array of indizes which will give
178
- * direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
179
- * then specifying array("var", 1) as the name will return "a".
180
- * @param mixed $default A default value that is returned if the variable was not set.
181
- * This function will always return a value of the same type as the default.
182
- * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
183
- * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
184
- * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
185
- * Specifies which super global should be used
176
+ * @param string|array $var_name The form variable's name from which data shall be retrieved.
177
+ * If the value is an array this may be an array of indizes which will give
178
+ * direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
179
+ * then specifying array("var", 1) as the name will return "a".
180
+ * @param mixed $default A default value that is returned if the variable was not set.
181
+ * This function will always return a value of the same type as the default.
182
+ * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
183
+ * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
184
+ * @param string $super_global ( \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
185
+ * Specifies which super global should be used
186
186
*
187
187
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
188
188
* the same as that of $default. If the variable is not set $default is returned.
@@ -197,16 +197,16 @@ public function variable($var_name, $default, $multibyte = false, $super_global
197
197
* Same functionality as variable(), except does not run trim() on strings.
198
198
* This method should be used when handling passwords.
199
199
*
200
- * @param string|array $var_name The form variable's name from which data shall be retrieved.
201
- * If the value is an array this may be an array of indizes which will give
202
- * direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
203
- * then specifying array("var", 1) as the name will return "a".
204
- * @param mixed $default A default value that is returned if the variable was not set.
205
- * This function will always return a value of the same type as the default.
206
- * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
207
- * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
208
- * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
209
- * Specifies which super global should be used
200
+ * @param string|array $var_name The form variable's name from which data shall be retrieved.
201
+ * If the value is an array this may be an array of indizes which will give
202
+ * direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
203
+ * then specifying array("var", 1) as the name will return "a".
204
+ * @param mixed $default A default value that is returned if the variable was not set.
205
+ * This function will always return a value of the same type as the default.
206
+ * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
207
+ * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
208
+ * @param string $super_global ( \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
209
+ * Specifies which super global should be used
210
210
*
211
211
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
212
212
* the same as that of $default. If the variable is not set $default is returned.
@@ -334,11 +334,11 @@ public function is_set_post($name)
334
334
* Checks whether a certain variable is set in one of the super global
335
335
* arrays.
336
336
*
337
- * @param string $var Name of the variable
338
- * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
339
- * Specifies the super global which shall be checked
337
+ * @param string $var Name of the variable
338
+ * @param string $super_global ( \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
339
+ * Specifies the super global which shall be checked
340
340
*
341
- * @return bool True if the variable was sent as input
341
+ * @return bool True if the variable was sent as input
342
342
*/
343
343
public function is_set ($ var , $ super_global = \phpbb \request \request_interface::REQUEST )
344
344
{
@@ -370,8 +370,8 @@ public function is_secure()
370
370
/**
371
371
* Returns all variable names for a given super global
372
372
*
373
- * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
374
- * The super global from which names shall be taken
373
+ * @param string $super_global ( \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
374
+ * The super global from which names shall be taken
375
375
*
376
376
* @return array All variable names that are set for the super global.
377
377
* Pay attention when using these, they are unsanitised!
@@ -389,17 +389,17 @@ public function variable_names($super_global = \phpbb\request\request_interface:
389
389
/**
390
390
* Helper function used by variable() and untrimmed_variable().
391
391
*
392
- * @param string|array $var_name The form variable's name from which data shall be retrieved.
393
- * If the value is an array this may be an array of indizes which will give
394
- * direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
395
- * then specifying array("var", 1) as the name will return "a".
396
- * @param mixed $default A default value that is returned if the variable was not set.
397
- * This function will always return a value of the same type as the default.
398
- * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
399
- * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
400
- * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global
401
- * Specifies which super global should be used
402
- * @param bool $trim Indicates whether trim() should be applied to string values.
392
+ * @param string|array $var_name The form variable's name from which data shall be retrieved.
393
+ * If the value is an array this may be an array of indizes which will give
394
+ * direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a")
395
+ * then specifying array("var", 1) as the name will return "a".
396
+ * @param mixed $default A default value that is returned if the variable was not set.
397
+ * This function will always return a value of the same type as the default.
398
+ * @param bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters
399
+ * Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
400
+ * @param string $super_global ( \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE)
401
+ * Specifies which super global should be used
402
+ * @param bool $trim Indicates whether trim() should be applied to string values.
403
403
*
404
404
* @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
405
405
* the same as that of $default. If the variable is not set $default is returned.
0 commit comments