[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/phpbb/request/ -> request_interface.php (summary)

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: 155 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

request_interface:: (11 methods):
  overwrite()
  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: \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE    $super_global

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 paramater has to be true if the variable may contain any UTF-8 characters
param: \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE    $super_global
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($var_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: \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE    $super_global
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: \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE    $super_global
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: \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE    $super_global
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: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1