aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/request/request.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2013-07-14 13:30:52 -0400
committerNils Adermann <naderman@naderman.de>2013-07-14 13:30:52 -0400
commitda2752e4004b296ae5acdd08b7c0a758d8f61e9d (patch)
treed29e821186f365c55120d8cba89014f30c73da19 /phpBB/phpbb/request/request.php
parentb81613e5e57fd208e832637b6886abf9ec806c4b (diff)
downloadforums-da2752e4004b296ae5acdd08b7c0a758d8f61e9d.tar
forums-da2752e4004b296ae5acdd08b7c0a758d8f61e9d.tar.gz
forums-da2752e4004b296ae5acdd08b7c0a758d8f61e9d.tar.bz2
forums-da2752e4004b296ae5acdd08b7c0a758d8f61e9d.tar.xz
forums-da2752e4004b296ae5acdd08b7c0a758d8f61e9d.zip
[ticket/11700] Modify all code to use the new interface names
PHPBB3-11700
Diffstat (limited to 'phpBB/phpbb/request/request.php')
-rw-r--r--phpBB/phpbb/request/request.php56
1 files changed, 28 insertions, 28 deletions
diff --git a/phpBB/phpbb/request/request.php b/phpBB/phpbb/request/request.php
index ae3c526d89..8c5bc12d96 100644
--- a/phpBB/phpbb/request/request.php
+++ b/phpBB/phpbb/request/request.php
@@ -23,18 +23,18 @@ if (!defined('IN_PHPBB'))
*
* @package phpbb_request
*/
-class phpbb_request implements phpbb_request_interface
+class phpbb_request implements phpbb_request_request_interface
{
/**
* @var array The names of super global variables that this class should protect if super globals are disabled.
*/
protected $super_globals = array(
- phpbb_request_interface::POST => '_POST',
- phpbb_request_interface::GET => '_GET',
- phpbb_request_interface::REQUEST => '_REQUEST',
- phpbb_request_interface::COOKIE => '_COOKIE',
- phpbb_request_interface::SERVER => '_SERVER',
- phpbb_request_interface::FILES => '_FILES',
+ phpbb_request_request_interface::POST => '_POST',
+ phpbb_request_request_interface::GET => '_GET',
+ phpbb_request_request_interface::REQUEST => '_REQUEST',
+ phpbb_request_request_interface::COOKIE => '_COOKIE',
+ phpbb_request_request_interface::SERVER => '_SERVER',
+ phpbb_request_request_interface::FILES => '_FILES',
);
/**
@@ -78,8 +78,8 @@ class phpbb_request implements phpbb_request_interface
}
// simulate request_order = GP
- $this->original_request = $this->input[phpbb_request_interface::REQUEST];
- $this->input[phpbb_request_interface::REQUEST] = $this->input[phpbb_request_interface::POST] + $this->input[phpbb_request_interface::GET];
+ $this->original_request = $this->input[phpbb_request_request_interface::REQUEST];
+ $this->input[phpbb_request_request_interface::REQUEST] = $this->input[phpbb_request_request_interface::POST] + $this->input[phpbb_request_request_interface::GET];
if ($disable_super_globals)
{
@@ -144,10 +144,10 @@ class phpbb_request implements phpbb_request_interface
* @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_interface::POST|GET|REQUEST|COOKIE $super_global
+ * @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global shall be changed
*/
- public function overwrite($var_name, $value, $super_global = phpbb_request_interface::REQUEST)
+ public function overwrite($var_name, $value, $super_global = phpbb_request_request_interface::REQUEST)
{
if (!isset($this->super_globals[$super_global]))
{
@@ -193,13 +193,13 @@ class phpbb_request implements phpbb_request_interface
* This function will always return a value of the same type as the default.
* @param bool $multibyte If $default is a string this paramater 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_interface::POST|GET|REQUEST|COOKIE $super_global
+ * @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
*
* @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.
*/
- public function variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_interface::REQUEST)
+ public function variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_request_interface::REQUEST)
{
return $this->_variable($var_name, $default, $multibyte, $super_global, true);
}
@@ -217,13 +217,13 @@ class phpbb_request implements phpbb_request_interface
* This function will always return a value of the same type as the default.
* @param bool $multibyte If $default is a string this paramater 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_interface::POST|GET|REQUEST|COOKIE $super_global
+ * @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
*
* @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.
*/
- public function untrimmed_variable($var_name, $default, $multibyte, $super_global = phpbb_request_interface::REQUEST)
+ public function untrimmed_variable($var_name, $default, $multibyte, $super_global = phpbb_request_request_interface::REQUEST)
{
return $this->_variable($var_name, $default, $multibyte, $super_global, false);
}
@@ -234,8 +234,8 @@ class phpbb_request implements phpbb_request_interface
* Also fall back to getenv(), some CGI setups may need it (probably not, but
* whatever).
*
- * @param string|array $var_name See phpbb_request_interface::variable
- * @param mixed $Default See phpbb_request_interface::variable
+ * @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.
*/
@@ -243,9 +243,9 @@ class phpbb_request implements phpbb_request_interface
{
$multibyte = true;
- if ($this->is_set($var_name, phpbb_request_interface::SERVER))
+ if ($this->is_set($var_name, phpbb_request_request_interface::SERVER))
{
- return $this->variable($var_name, $default, $multibyte, phpbb_request_interface::SERVER);
+ return $this->variable($var_name, $default, $multibyte, phpbb_request_request_interface::SERVER);
}
else
{
@@ -259,7 +259,7 @@ class phpbb_request implements phpbb_request_interface
* 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_interface::variable
+ * @param mixed $default See phpbb_request_request_interface::variable
*
* @return mixed The header value.
*/
@@ -279,7 +279,7 @@ class phpbb_request implements phpbb_request_interface
*/
public function file($form_name)
{
- return $this->variable($form_name, array('name' => 'none'), false, phpbb_request_interface::FILES);
+ return $this->variable($form_name, array('name' => 'none'), false, phpbb_request_request_interface::FILES);
}
/**
@@ -294,7 +294,7 @@ class phpbb_request implements phpbb_request_interface
*/
public function is_set_post($name)
{
- return $this->is_set($name, phpbb_request_interface::POST);
+ return $this->is_set($name, phpbb_request_request_interface::POST);
}
/**
@@ -302,12 +302,12 @@ class phpbb_request implements phpbb_request_interface
* arrays.
*
* @param string $var Name of the variable
- * @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies the super global which shall be checked
*
* @return bool True if the variable was sent as input
*/
- public function is_set($var, $super_global = phpbb_request_interface::REQUEST)
+ public function is_set($var, $super_global = phpbb_request_request_interface::REQUEST)
{
return isset($this->input[$super_global][$var]);
}
@@ -335,13 +335,13 @@ class phpbb_request implements phpbb_request_interface
/**
* Returns all variable names for a given super global
*
- * @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
+ * @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
* 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!
*/
- public function variable_names($super_global = phpbb_request_interface::REQUEST)
+ public function variable_names($super_global = phpbb_request_request_interface::REQUEST)
{
if (!isset($this->input[$super_global]))
{
@@ -362,14 +362,14 @@ class phpbb_request implements phpbb_request_interface
* This function will always return a value of the same type as the default.
* @param bool $multibyte If $default is a string this paramater 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_interface::POST|GET|REQUEST|COOKIE $super_global
+ * @param phpbb_request_request_interface::POST|GET|REQUEST|COOKIE $super_global
* Specifies which super global should be used
* @param bool $trim Indicates whether trim() should be applied to string values.
*
* @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.
*/
- protected function _variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_interface::REQUEST, $trim = true)
+ protected function _variable($var_name, $default, $multibyte = false, $super_global = phpbb_request_request_interface::REQUEST, $trim = true)
{
$path = false;