mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[feature/request-class] Refactor request classes to use autoloading
All class names have been adjusted to use a phpbb_request prefix, allowing them to be autoloaded. Also introduces some improvements to autoloading in general. PHPBB3-9716
This commit is contained in:
committed by
Nils Adermann
parent
b3558b5078
commit
456de63912
@@ -21,7 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
function set_var(&$result, $var, $type, $multibyte = false)
|
||||
{
|
||||
// no need for dependency injection here, if you have the object, call the method yourself!
|
||||
$type_cast_helper = new phpbb_type_cast_helper();
|
||||
$type_cast_helper = new phpbb_request_type_cast_helper();
|
||||
$type_cast_helper->set_var($result, $var, $type, $multibyte);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false, p
|
||||
{
|
||||
// false param: enable super globals, so the created request class does not
|
||||
// make super globals inaccessible everywhere outside this function.
|
||||
$tmp_request = new phpbb_request(new phpbb_type_cast_helper(), false);
|
||||
$tmp_request = new phpbb_request(new phpbb_request_type_cast_helper(), false);
|
||||
}
|
||||
|
||||
return $tmp_request->variable($var_name, $default, $multibyte, ($cookie) ? phpbb_request_interface::COOKIE : phpbb_request_interface::REQUEST);
|
||||
|
Reference in New Issue
Block a user