diff options
author | Mike Funk <mfunk@xulonpress.com> | 2012-02-23 20:56:18 +0100 |
---|---|---|
committer | Mike Funk <mfunk@xulonpress.com> | 2012-02-23 20:56:18 +0100 |
commit | c15e17c3fe6110a4e08a56cde3514c02359fe080 (patch) | |
tree | 345178351f1bd5c8d4ddf79cd6c24e43f84b2655 /system/libraries/Session.php | |
parent | 27a536dd3570f867ef807ab12391da032b32f09a (diff) |
added all_flashdata function to Session.php
Diffstat (limited to 'system/libraries/Session.php')
-rw-r--r-- | system/libraries/Session.php | 23 |
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; + } // -------------------------------------------------------------------- |