| | |
| | | |
| | | |
| | | /** |
| | | * Cleanup session data before saving |
| | | */ |
| | | public function cleanup() |
| | | { |
| | | // current compose information is stored in $_SESSION['compose'], move it to $_SESSION['compose_data_<ID>'] |
| | | if ($compose_id = $_SESSION['compose']['id']) { |
| | | $_SESSION['compose_data_'.$compose_id] = $_SESSION['compose']; |
| | | $this->remove('compose'); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Register additional garbage collector functions |
| | | * |
| | | * @param mixed Callback function |
| | |
| | | |
| | | |
| | | /** |
| | | * Re-read session data from storage backend |
| | | */ |
| | | public function reload() |
| | | { |
| | | if ($this->key && $this->memcache) |
| | | $data = $this->mc_read($this->key); |
| | | else if ($this->key) |
| | | $data = $this->db_read($this->key); |
| | | |
| | | if ($data) |
| | | session_decode($data); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Serialize session data |
| | | */ |
| | | private function serialize($vars) |