summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorMike Funk <mfunk@xulonpress.com>2012-02-23 20:56:18 +0100
committerMike Funk <mfunk@xulonpress.com>2012-02-23 20:56:18 +0100
commitc15e17c3fe6110a4e08a56cde3514c02359fe080 (patch)
tree345178351f1bd5c8d4ddf79cd6c24e43f84b2655 /system
parent27a536dd3570f867ef807ab12391da032b32f09a (diff)
added all_flashdata function to Session.php
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Session.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/system/libraries/Session.php b/system/libraries/Session.php
index 66b39a6a2..a594d24ef 100644
--- a/system/libraries/Session.php
+++ b/system/libraries/Session.php
@@ -468,6 +468,29 @@ class CI_Session {
{
return $this->userdata;
}
+
+ // --------------------------------------------------------------------------
+
+ /**
+ * Fetch all flashdata
+ *
+ * @return array
+ */
+ public function all_flashdata()
+ {
+ $out = array();
+
+ // loop through all userdata
+ foreach ($this->all_userdata() as $key => $val)
+ {
+ // if it contains flashdata, add it
+ if (strpos($key, 'flash:old:') !== FALSE)
+ {
+ $out[$key] = $val;
+ }
+ }
+ return $out;
+ }
// --------------------------------------------------------------------