diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2014-03-06 14:54:19 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2014-03-06 14:54:19 +0000 |
commit | 1418498c406caca058076e3d148e31daee800551 (patch) | |
tree | 50aaeed462f4c50a9cac001846733bb2fe5716a6 | |
parent | 3cd4fc17379f0f917d5e1ed4d20decfb662aaf32 (diff) | |
download | rpg-1418498c406caca058076e3d148e31daee800551.tar.gz rpg-1418498c406caca058076e3d148e31daee800551.tar.bz2 |
extend to cover (PR#589)
-rw-r--r-- | inc/Input.class.php | 18 |
1 files changed, 18 insertions, 0 deletions
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; + } + +} |