From ccd177ada6823c27a6408427f19c238fd701c39e Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Wed, 6 Dec 2017 16:19:11 -0800 Subject: Store PHP sessions in the database --- app/Core/Session/SessionStorage.php | 92 ------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 app/Core/Session/SessionStorage.php (limited to 'app/Core/Session/SessionStorage.php') diff --git a/app/Core/Session/SessionStorage.php b/app/Core/Session/SessionStorage.php deleted file mode 100644 index bb6771f1..00000000 --- a/app/Core/Session/SessionStorage.php +++ /dev/null @@ -1,92 +0,0 @@ -storage =& $storage; - - // Load dynamically existing session variables into object properties - foreach ($storage as $key => $value) { - $this->$key = $value; - } - } - - /** - * Get all session variables - * - * @access public - * @return array - */ - public function getAll() - { - $session = get_object_vars($this); - unset($session['storage']); - - return $session; - } - - /** - * 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 - */ - public function __destruct() - { - $this->storage = $this->getAll(); - } -} -- cgit v1.2.3