<?php

declare(strict_types=1);

namespace App\Framework\Http;

/**
 * Enum für $_SERVER-Array-Keys
 * Bietet Typsicherheit und IDE-Unterstützung für Server-Variablen
 */
enum ServerKey: string
{
    // Request-Informationen
    case REQUEST_METHOD = 'REQUEST_METHOD';
    case REQUEST_URI = 'REQUEST_URI';
    case QUERY_STRING = 'QUERY_STRING';
    case REQUEST_SCHEME = 'REQUEST_SCHEME';

    // Server-Informationen
    case SERVER_NAME = 'SERVER_NAME';
    case SERVER_PORT = 'SERVER_PORT';
    case SERVER_PROTOCOL = 'SERVER_PROTOCOL';
    case SCRIPT_NAME = 'SCRIPT_NAME';
    case DOCUMENT_ROOT = 'DOCUMENT_ROOT';

    // Client-Informationen
    case REMOTE_ADDR = 'REMOTE_ADDR';
    case REMOTE_HOST = 'REMOTE_HOST';
    case REMOTE_PORT = 'REMOTE_PORT';
    case REMOTE_USER = 'REMOTE_USER';

    // HTTP-Header (als SERVER-Variablen)
    case HTTP_HOST = 'HTTP_HOST';
    case HTTP_USER_AGENT = 'HTTP_USER_AGENT';
    case HTTP_ACCEPT = 'HTTP_ACCEPT';
    case HTTP_ACCEPT_LANGUAGE = 'HTTP_ACCEPT_LANGUAGE';
    case HTTP_ACCEPT_ENCODING = 'HTTP_ACCEPT_ENCODING';
    case HTTP_CONNECTION = 'HTTP_CONNECTION';
    case HTTP_REFERER = 'HTTP_REFERER';
    case HTTP_AUTHORIZATION = 'HTTP_AUTHORIZATION';
    case HTTP_X_FORWARDED_FOR = 'HTTP_X_FORWARDED_FOR';
    case HTTP_X_FORWARDED_PROTO = 'HTTP_X_FORWARDED_PROTO';
    case HTTP_X_FORWARDED = 'HTTP_X_FORWARDED';
    case HTTP_X_REAL_IP = 'HTTP_X_REAL_IP';
    case HTTP_CF_CONNECTING_IP = 'HTTP_CF_CONNECTING_IP';
    case HTTP_CLIENT_IP = 'HTTP_CLIENT_IP';
    case HTTP_X_CLUSTER_CLIENT_IP = 'HTTP_X_CLUSTER_CLIENT_IP';
    case HTTP_FORWARDED_FOR = 'HTTP_FORWARDED_FOR';
    case HTTP_FORWARDED = 'HTTP_FORWARDED';
    case HTTP_SEC_WEBSOCKET_KEY = 'HTTP_SEC_WEBSOCKET_KEY';
    case HTTP_X_REQUESTED_WITH = 'HTTP_X_REQUESTED_WITH';
    case HTTP_X_SPA_REQUEST = 'HTTP_X_SPA_REQUEST';

    // HTTPS und Sicherheit
    case HTTPS = 'HTTPS';
    case SSL_PROTOCOL = 'SSL_PROTOCOL';

    // CGI/FastCGI-spezifisch
    case GATEWAY_INTERFACE = 'GATEWAY_INTERFACE';
    case SERVER_SOFTWARE = 'SERVER_SOFTWARE';

    // Pfad-Informationen
    case PATH_INFO = 'PATH_INFO';
    case PATH_TRANSLATED = 'PATH_TRANSLATED';

    // Content-Informationen
    case CONTENT_LENGTH = 'CONTENT_LENGTH';
    case CONTENT_TYPE = 'CONTENT_TYPE';
}
