From 1418498c406caca058076e3d148e31daee800551 Mon Sep 17 00:00:00 2001 From: Christopher Smith <chris@jalakai.co.uk> Date: Thu, 6 Mar 2014 14:54:19 +0000 Subject: [PATCH] extend to cover (PR#589) --- inc/Input.class.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/inc/Input.class.php b/inc/Input.class.php index 7434d2b2c..de8bf5b97 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; + } + +} -- GitLab