# QueryInput

> Reads Prefix[attribute] filter groups and scalar values from a parsed query-parameter array.

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Data](/docs/extensions/debug-core/reference/data/index.md) › QueryInput

| final class | `PHPForge\Debug\Data\QueryInput` |
| --- | --- |
| Source | [`src/Data/QueryInput.php`](https://github.com/php-forge/debug-core/blob/main/src/Data/QueryInput.php#L17) |

Reads `Prefix[attribute]` filter groups and scalar values from a parsed query-parameter array.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`group()`](#method-group) static | Returns the active `Prefix[attribute]` filter map from the query parameters. | `QueryInput` |
| [`minimumBound()`](#method-minimumBound) static | Returns a submitted lower bound as a finite, non-negative number, or `null` when the value is unusable. | `QueryInput` |
| [`scalar()`](#method-scalar) static | Returns a top-level query parameter as a string, or `null` when absent or non-scalar. | `QueryInput` |

## Method details

### group() <span id="method-group"></span>

```php
public static function group(array<array-key, mixed> $query, string $prefix): array<string, string>
```

Returns the active `Prefix[attribute]` filter map from the query parameters.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$query` | `array<array-key, mixed>` | Parsed query parameters. |
| `$prefix` | `string` | Filter-group prefix (for example, `Debug` matches `Debug[statusCode]`). |

**Returns**

`array<string, string>`: Attribute-to-value map with empty and non-scalar entries removed.

### minimumBound() <span id="method-minimumBound"></span>

```php
public static function minimumBound(string $value): float|null
```

Returns a submitted lower bound as a finite, non-negative number, or `null` when the value is unusable.

Empty, non-numeric, negative, and overflowing values are rejected, so callers can clear the stored filter
whenever `null` comes back.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$value` | `string` | Raw submitted bound. |

**Returns**

`float|null`: Finite, non-negative bound, or `null` when the value is unusable.

### scalar() <span id="method-scalar"></span>

```php
public static function scalar(array<array-key, mixed> $query, string $name): string|null
```

Returns a top-level query parameter as a string, or `null` when absent or non-scalar.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$query` | `array<array-key, mixed>` | Parsed query parameters. |
| `$name` | `string` | Parameter name to read. |

**Returns**

`string|null`: Parameter value as a string, or `null` when absent or non-scalar.