private function getHttpMethod(): string
    {
        if (!empty($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
            $method = mb_strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
        } else {
            $method = mb_strtoupper($_SERVER['REQUEST_METHOD']);
        }

        switch ($method) {
            case 'GET':
                return static::HTTP_METHOD_GET;
            case 'HEAD':
                return static::HTTP_METHOD_HEAD;
            case 'POST':
                return static::HTTP_METHOD_POST;
            case 'OPTIONS':
                return static::HTTP_METHOD_OPTIONS;
            case 'CONNECT':
                return static::HTTP_METHOD_CONNECT;
            case 'TRACE':
                return static::HTTP_METHOD_TRACE;
            case 'PUT':
                return static::HTTP_METHOD_PUT;
            case 'DELETE':
                return static::HTTP_METHOD_DELETE;
            default:
                return static::HTTP_METHOD_UNKNOWN;
        }
    }
private function getHttpMethod(): string
    {
        if (!empty($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
            $method = mb_strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
        } else {
            $method = mb_strtoupper($_SERVER['REQUEST_METHOD']);
        }

        switch ($method) {
            case 'GET':
                return static::HTTP_METHOD_GET;
            case 'HEAD':
                return static::HTTP_METHOD_HEAD;
            case 'POST':
                return static::HTTP_METHOD_POST;
            case 'OPTIONS':
                return static::HTTP_METHOD_OPTIONS;
            case 'CONNECT':
                return static::HTTP_METHOD_CONNECT;
            case 'TRACE':
                return static::HTTP_METHOD_TRACE;
            case 'PUT':
                return static::HTTP_METHOD_PUT;
            case 'DELETE':
                return static::HTTP_METHOD_DELETE;
            default:
                return static::HTTP_METHOD_UNKNOWN;
        }
    }
private function getHttpMethod ( ) : string { if ( ! empty ( $ _SERVER [ 'HTTP_X_HTTP_METHOD_OVERRIDE' ] ) ) { $ method = mb_strtoupper ( $ _SERVER [ 'HTTP_X_HTTP_METHOD_OVERRIDE' ] ) ; } else { $ method = mb_strtoupper ( $ _SERVER [ 'REQUEST_METHOD' ] ) ; } switch ( $ method ) { case 'GET' : return static :: HTTP_METHOD_GET ; case 'HEAD' : return static :: HTTP_METHOD_HEAD ; case 'POST' : return static :: HTTP_METHOD_POST ; case 'OPTIONS' : return static :: HTTP_METHOD_OPTIONS ; case 'CONNECT' : return static :: HTTP_METHOD_CONNECT ; case 'TRACE' : return static :: HTTP_METHOD_TRACE ; case 'PUT' : return static :: HTTP_METHOD_PUT ; case 'DELETE' : return static :: HTTP_METHOD_DELETE ; default : return static :: HTTP_METHOD_UNKNOWN ; } }
Get HTTP method of request.

@return string
Get HTTP method of request .