Skip to content
PHP Ecosystem
Explore

QueryInput

API reference › Debug Core › Data › QueryInput

final classPHPForge\Debug\Data\QueryInput
Sourcesrc/Data/QueryInput.php

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

MethodDescriptionDefined by
group() staticReturns the active Prefix[attribute] filter map from the query parameters.QueryInput
minimumBound() staticReturns a submitted lower bound as a finite, non-negative number, or null when the value is unusable.QueryInput
scalar() staticReturns a top-level query parameter as a string, or null when absent or non-scalar.QueryInput
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

ParameterTypeDescription
$queryarray<array-key, mixed>Parsed query parameters.
$prefixstringFilter-group prefix (for example, Debug matches Debug[statusCode]).

Returns

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

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

ParameterTypeDescription
$valuestringRaw submitted bound.

Returns

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

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

ParameterTypeDescription
$queryarray<array-key, mixed>Parsed query parameters.
$namestringParameter name to read.

Returns

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