QueryInput
API reference › Debug Core › Data › QueryInput
Reads Prefix[attribute] filter groups and scalar values from a parsed query-parameter array.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
group() static | Returns the active Prefix[attribute] filter map from the query parameters. | QueryInput |
minimumBound() static | Returns a submitted lower bound as a finite, non-negative number, or null when the value is unusable. | QueryInput |
scalar() static | Returns a top-level query parameter as a string, or null when absent or non-scalar. | QueryInput |
Method details
Section titled “Method details”group()
Section titled “group() ”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, | 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()
Section titled “minimumBound() ”public static function minimumBound(string $value): float|nullReturns 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()
Section titled “scalar() ”public static function scalar(array<array-key, mixed> $query, string $name): string|nullReturns a top-level query parameter as a string, or null when absent or non-scalar.
Parameters
| Parameter | Type | Description |
|---|---|---|
$query | array<array-key, | Parsed query parameters. |
$name | string | Parameter name to read. |
Returns
string|null: Parameter value as a string, or null when absent or non-scalar.