Skip to content
PHP Ecosystem
Explore

DbSearch

API reference › Yii3 Debug › Search › DbSearch

final readonly classYii3\Debug\Search\DbSearch
Sourcesrc/Search/DbSearch.php

Applies the Yii2-compatible Database type and SQL substring filters.

PropertyTypeDescriptionDefined by
$activeFilters readonly constructorarray<string, string>Submitted filter values kept for this group, keyed by attribute.DbSearch
MethodDescriptionDefined by
filter()Keeps only the statements matching every active filter.DbSearch
fromQueryParams() staticBuilds the search model from the submitted filter values.DbSearch
public function filter(list<PHPForge\Debug\Panel\Db\QueryRow> $rows): list<PHPForge\Debug\Panel\Db\QueryRow>

Keeps only the statements matching every active filter.

Parameters

ParameterTypeDescription
$rowslist<PHPForge\Debug\Panel\Db\QueryRow>Captured statements to filter.

Returns

list<PHPForge\Debug\Panel\Db\QueryRow>: Rows matching every active filter, reindexed.

public static function fromQueryParams(array<array-key, mixed> $queryParams): self

Builds the search model from the submitted filter values.

Parameters

ParameterTypeDescription
$queryParamsarray<array-key, mixed>Raw query parameters of the debugger request.

Returns

self: Search model holding the active statement filters.