mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
[feature/oauth] Allow getting original global arrays from request
PHPBB3-11673
This commit is contained in:
parent
6479a989c5
commit
a6ff239778
3 changed files with 23 additions and 0 deletions
|
@ -136,4 +136,14 @@ interface phpbb_request_interface
|
|||
* Pay attention when using these, they are unsanitised!
|
||||
*/
|
||||
public function variable_names($super_global = phpbb_request_interface::REQUEST);
|
||||
|
||||
/**
|
||||
* Returns the original array of the requested super global
|
||||
*
|
||||
* @param phpbb_request_interface::POST|GET|REQUEST|COOKIE $super_global
|
||||
* The super global which will be returned
|
||||
*
|
||||
* @return array The original array of the requested super global.
|
||||
*/
|
||||
public function original_global_values($super_global = phpbb_request_interface::REQUEST);
|
||||
}
|
||||
|
|
|
@ -412,4 +412,12 @@ class phpbb_request implements phpbb_request_interface
|
|||
|
||||
return $var;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function original_global_values($super_global = phpbb_request_interface::REQUEST)
|
||||
{
|
||||
return $this->input[$super_global];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,6 +74,11 @@ class phpbb_mock_request implements phpbb_request_interface
|
|||
return array_keys($this->data[$super_global]);
|
||||
}
|
||||
|
||||
public function original_global_values($super_global = phpbb_request_interface::REQUEST)
|
||||
{
|
||||
return $this->data[$super_global];
|
||||
}
|
||||
|
||||
/* custom methods */
|
||||
|
||||
public function set_header($header_name, $value)
|
||||
|
|
Loading…
Add table
Reference in a new issue