fe_user->getKey('ses', $this->prefixKey . $key); return unserialize($sessionData); } /** * Writes an object into the PHP session * @param $object * @param string * @return SessionHandler this */ public function writeToSession($object, $key) { $sessionData = serialize($object); $GLOBALS['TSFE']->fe_user->setKey('ses', $this->prefixKey . $key, $sessionData); $GLOBALS['TSFE']->fe_user->storeSessionData(); return $this; } /** * Cleans up the session: removes the stored object from the PHP session * @return SessionHandler this */ public function cleanUpSession($key) { $GLOBALS['TSFE']->fe_user->setKey('ses', $this->prefixKey . $key, NULL); $GLOBALS['TSFE']->fe_user->storeSessionData(); return $this; } public function setPrefixKey($prefixKey) { $this->prefixKey = $prefixKey; } } ?>