summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-19 14:55:33 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-19 14:55:33 +0100
commit6c9f06ff70b1d020a9554dc1eaae796f47988d8f (patch)
treed5405ead3cdccbf115a601df0fb03b2d5e46a45e /system/libraries
parent7eea3064af3be5dd0b526056211a510f90a40766 (diff)
parent1ce0c424dd33d3b72ee61f5b812802ec0f073880 (diff)
Merge pull request #1074 from mikedfunk/feature/all_flashdata
Feature/all flashdata
Diffstat (limited to 'system/libraries')
-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 0c8d46591..3a80c1626 100644
--- a/system/libraries/Session.php
+++ b/system/libraries/Session.php
@@ -469,6 +469,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;
+ }
// --------------------------------------------------------------------