diff --git a/inc/Input.class.php b/inc/Input.class.php index 7434d2b2c8c7179686c4cf132cc6240425697c51..de8bf5b978ae3d40b1c0ac5c20ff018d778b3d3f 100644 --- a/inc/Input.class.php +++ b/inc/Input.class.php @@ -15,6 +15,8 @@ class Input { public $post; /** @var GetInput Access $_GET parameters */ public $get; + /** @var ServerInput Access $_SERVER parameters */ + public $server; protected $access; @@ -25,6 +27,7 @@ class Input { $this->access = &$_REQUEST; $this->post = new PostInput(); $this->get = new GetInput(); + $this->server = new ServerInput(); } /** @@ -260,3 +263,18 @@ class GetInput extends Input { $_REQUEST[$name] = $value; } } + +/** + * Internal class used for $_SERVER access in Input class + */ +class ServerInput extends Input { + protected $access; + + /** + * Initialize the $access array, remove subclass members + */ + function __construct() { + $this->access = &$_SERVER; + } + +}