[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Source view] [Print] [Project Stats]
This file is part of the phpBB Forum Software package.
Copyright: | (c) phpBB Limited |
License: | GNU General Public License, version 2 (GPL-2.0) |
File Size: | 177 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
request_interface:: (12 methods):
overwrite()
variable()
raw_variable()
server()
header()
is_set_post()
is_set()
is_ajax()
is_secure()
variable_names()
get_super_global()
escape()
Interface: request_interface - X-Ref
An interface through which all application input can be accessed.overwrite($var_name, $value, $super_global = \phpbb\request\request_interface::REQUEST) X-Ref |
This function allows overwriting or setting a value in one of the super global arrays. Changes which are performed on the super globals directly will not have any effect on the results of 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. param: string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) |
variable($var_name, $default, $multibyte = false, $super_global = \phpbb\request\request_interface::REQUEST) X-Ref |
Central type safe input handling function. All variables in GET or POST requests should be retrieved through this function to maximise security. param: string|array $var_name The form variable's name from which data shall be retrieved. param: mixed $default A default value that is returned if the variable was not set. param: bool $multibyte If $default is a string this parameter has to be true if the variable may contain any UTF-8 characters param: string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) return: mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the |
raw_variable($var_name, $default, $super_global = \phpbb\request\request_interface::REQUEST) X-Ref |
Get a variable without trimming strings and without escaping. This method MUST NOT be used with queries. Same functionality as variable(), except does not run trim() on strings and does not escape input. This method should only be used when the raw input is needed without any escaping, i.e. for database password during the installation. param: string|array $var_name The form variable's name from which data shall be retrieved. param: mixed $default A default value that is returned if the variable was not set. param: string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) return: mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the |
server($var_name, $default = '') X-Ref |
Shortcut method to retrieve SERVER variables. param: string|array $var_name See \phpbb\request\request_interface::variable param: mixed $default See \phpbb\request\request_interface::variable return: mixed The server variable value. |
header($header_name, $default = '') X-Ref |
Shortcut method to retrieve the value of client HTTP headers. param: string|array $header_name The name of the header to retrieve. param: mixed $default See \phpbb\request\request_interface::variable return: mixed The header value. |
is_set_post($name) X-Ref |
Checks whether a certain variable was sent via POST. To make sure that a request was sent using POST you should call this function on at least one variable. param: string $name The name of the form variable which should have a return: bool True if the variable was set in a POST request, false otherwise. |
is_set($var, $super_global = \phpbb\request\request_interface::REQUEST) X-Ref |
Checks whether a certain variable is set in one of the super global arrays. param: string $var Name of the variable param: string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) return: bool True if the variable was sent as input |
is_ajax() X-Ref |
Checks whether the current request is an AJAX request (XMLHttpRequest) return: bool True if the current request is an ajax request |
is_secure() X-Ref |
Checks if the current request is happening over HTTPS. return: bool True if the request is secure. |
variable_names($super_global = \phpbb\request\request_interface::REQUEST) X-Ref |
Returns all variable names for a given super global param: string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) return: array All variable names that are set for the super global. |
get_super_global($super_global = \phpbb\request\request_interface::REQUEST) X-Ref |
Returns the original array of the requested super global param: string $super_global (\phpbb\request\request_interface::POST|GET|REQUEST|COOKIE) return: array The original array of the requested super global. |
escape($value, $multibyte) X-Ref |
Escape a string variable. param: mixed $value The contents to fill with param: bool $multibyte Indicates whether string values may contain UTF-8 characters. return: string|array |
Generated: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |