protected function getSessionData($key) { if ($key === 'id') { return session_id(); } return isset($_SESSION[$key]) ? $_SESSION[$key] : null; }