constructSessionVariableName($key); $_SESSION[$session_var_name] = $value; } protected function getPersistentData($key, $default = false) { if (!in_array($key, self::$kSupportedKeys)) { self::errorLog('Unsupported key passed to getPersistentData.'); return $default; } $session_var_name = $this->constructSessionVariableName($key); return isset($_SESSION[$session_var_name]) ? $_SESSION[$session_var_name] : $default; } protected function clearAllPersistentData() { foreach (self::$kSupportedKeys as $key) { $session_var_name = $this->constructSessionVariableName($key); unset($_SESSION[$session_var_name]); } } protected function constructSessionVariableName($key) { return implode('_', array('fb', $this->getAppId(), $key)); } }