summaryrefslogtreecommitdiff
path: root/inc/Input.class.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2014-03-06 14:54:19 +0000
committerChristopher Smith <chris@jalakai.co.uk>2014-03-06 14:54:19 +0000
commit1418498c406caca058076e3d148e31daee800551 (patch)
tree50aaeed462f4c50a9cac001846733bb2fe5716a6 /inc/Input.class.php
parent3cd4fc17379f0f917d5e1ed4d20decfb662aaf32 (diff)
downloadrpg-1418498c406caca058076e3d148e31daee800551.tar.gz
rpg-1418498c406caca058076e3d148e31daee800551.tar.bz2
extend to cover (PR#589)
Diffstat (limited to 'inc/Input.class.php')
-rw-r--r--inc/Input.class.php18
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;
+ }
+
+}