DbSearch
API reference › Yii3 Debug › Search › DbSearch
Applies the Yii2-compatible Database type and SQL substring filters.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$activeFilters readonly constructor | array<string, | Submitted filter values kept for this group, keyed by attribute. | DbSearch |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
filter() | Keeps only the statements matching every active filter. | DbSearch |
fromQueryParams() static | Builds the search model from the submitted filter values. | DbSearch |
Method details
Section titled “Method details”filter()
Section titled “filter() ”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
| Parameter | Type | Description |
|---|---|---|
$rows | list<PHPForge\ | Captured statements to filter. |
Returns
list<PHPForge\Debug\Panel\Db\QueryRow>: Rows matching every active filter, reindexed.
fromQueryParams()
Section titled “fromQueryParams() ”public static function fromQueryParams(array<array-key, mixed> $queryParams): selfBuilds the search model from the submitted filter values.
Parameters
| Parameter | Type | Description |
|---|---|---|
$queryParams | array<array-key, | Raw query parameters of the debugger request. |
Returns
self: Search model holding the active statement filters.