Removed the dependency of the request class test on having an actual
phpbb_type_cast_helper instance, by replacing it with an object mocking
the phpbb_type_cast_helper_interface.
PHPBB3-9716
The request class
- now makes use of the new type cast helper (dependency injection)
- has no static methods anymore.
- now has a constructor argument to leave super globals turned on
Brought back the set_var function in functions.php. It is now a wrapper
around the type cast helper. It creates an instance on the fly.
The request_var wrapper function now has an optional last argument to
inject the request class instance, rather than abusing the $var_name.
PHPBB3-9716
The well known request_var function is now a wrapper that calls a method
on a phpbb_request object. The class provides additional functionality.
It can replace all super globals with special objects that throw errors
when being accessed. They still allow isset operations to keep backward
compatibility with isset($_POST['var']) checks. The phpbb_request class
implements the phpbb_request_interface which is available for easy mocking
of input in tests.
PHPBB3-9716