summaryrefslogtreecommitdiffstats
path: root/system/core/Input.php
diff options
context:
space:
mode:
authorAhmad Anbar <aanbar@gmail.com>2014-12-02 09:04:46 +0100
committerAhmad Anbar <aanbar@gmail.com>2014-12-02 09:04:46 +0100
commit89432af4adb4011ad8aa5252838dc76a3a5acec7 (patch)
tree60f0f63c919f58b50691f672789f8d156d1ad13b /system/core/Input.php
parent5078eb5062457c1eef2fab0c58fa27f249616b78 (diff)
Allow pulling multiple get/post ...etc at once
Diffstat (limited to 'system/core/Input.php')
-rw-r--r--system/core/Input.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index 81555df9a..0dcb6f425 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -168,6 +168,18 @@ class CI_Input {
return $output;
}
+ // allow fetching multiple keys at once
+ if (is_array($index))
+ {
+ $output = array();
+ foreach($index as $var)
+ {
+ $output[$var] = $this->_fetch_from_array($array, $var, $xss_clean);
+ }
+
+ return $output;
+ }
+
is_bool($xss_clean) OR $xss_clean = $this->_enable_xss;
if (isset($array[$index]))