summaryrefslogtreecommitdiffstats
path: root/system/libraries/Input.php
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-06-20 07:39:18 +0200
committerDerek Allard <derek.allard@ellislab.com>2008-06-20 07:39:18 +0200
commitd3ee04109528470666c016fcc05c69941de879b2 (patch)
tree8e2937f525138b4bb7924ed6f6091a0d1fc1f0d8 /system/libraries/Input.php
parent0f109193689f22ff9b9764c299f3297d987ce78d (diff)
Added get_post() to the Input class.
Documented get() in the Input class.
Diffstat (limited to 'system/libraries/Input.php')
-rw-r--r--system/libraries/Input.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/system/libraries/Input.php b/system/libraries/Input.php
index 8c08468bd..0b05c54d6 100644
--- a/system/libraries/Input.php
+++ b/system/libraries/Input.php
@@ -274,6 +274,28 @@ class CI_Input {
// --------------------------------------------------------------------
/**
+ * Fetch an item from either the GET array or the POST
+ *
+ * @access public
+ * @param string The index key
+ * @param bool XSS cleaning
+ * @return string
+ */
+ function get_post($index = '', $xss_clean = FALSE)
+ {
+ if ( ! isset($_POST[$index]) )
+ {
+ return $this->get($index, $xss_clean);
+ }
+ else
+ {
+ return $this->post($index, $xss_clean);
+ }
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Fetch an item from the COOKIE array
*
* @access public