diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-12-06 08:23:53 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-12-06 08:23:53 -0500 |
commit | d0e809a32cd58c0d89b2425aeb245e04a94df7d6 (patch) | |
tree | 154070c7b7a99ca47ef21702d5c9498bfb920a16 /app/Core/Session | |
parent | 9bd7985ba41b385c63213970b862ffc06f1096b0 (diff) |
Add new method to flush session variables
Diffstat (limited to 'app/Core/Session')
-rw-r--r-- | app/Core/Session/SessionStorage.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/Core/Session/SessionStorage.php b/app/Core/Session/SessionStorage.php index 11230793..f55a7ee3 100644 --- a/app/Core/Session/SessionStorage.php +++ b/app/Core/Session/SessionStorage.php @@ -62,6 +62,21 @@ class SessionStorage } /** + * Flush session data + * + * @access public + */ + public function flush() + { + $session = get_object_vars($this); + unset($session['storage']); + + foreach (array_keys($session) as $property) { + unset($this->$property); + } + } + + /** * Copy class properties to external storage * * @access public |