Skip to content
PHP Ecosystem
Explore

LogSearch

API reference › Yii3 Debug › Search › LogSearch

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

Applies the Yii2-compatible Log[attribute] filters to captured log and dump rows.

PropertyTypeDescriptionDefined by
$activeFilters readonly constructorarray<string, string>Submitted filter values kept for this group, keyed by attribute.LogSearch
MethodDescriptionDefined by
category()Returns the submitted category filter value.LogSearch
filter()Keeps only the rows matching every active filter.LogSearch
fromQueryParams() staticBuilds the search model from the submitted filter values.LogSearch
level()Returns the submitted level filter value.LogSearch
message()Returns the submitted message filter value.LogSearch
public function category(): string

Returns the submitted category filter value.

Returns

string: Submitted category filter value, or '' when the filter is not active.

public function filter(list<Yii3\Debug\Search\TRow> $rows): list<Yii3\Debug\Search\TRow>

Keeps only the rows matching every active filter.

Dump rows carry the level, category, and message fields of log rows, so the Dump grid filters through the same Log[...] group, as it does in Yii2.

Parameters

ParameterTypeDescription
$rowslist<Yii3\Debug\Search\TRow>Captured rows to filter.

Returns

list<Yii3\Debug\Search\TRow>: 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 message filters.

public function level(): string

Returns the submitted level filter value.

Returns

string: Submitted level filter value, or '' when the filter is not active.

public function message(): string

Returns the submitted message filter value.

Returns

string: Submitted message filter value, or '' when the filter is not active.