Skip to content
PHP Ecosystem
Explore

ProfileSearch

API reference › Yii3 Debug › Search › ProfileSearch

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

Filters captured profile rows for the unified Profiling timeline and table.

PropertyTypeDescriptionDefined by
$activeFilters readonly constructorarray<string, string>Submitted filter values kept for this group, keyed by attribute.ProfileSearch
MethodDescriptionDefined by
category()Returns the submitted category filter value.ProfileSearch
duration()Returns the submitted duration filter value.ProfileSearch
filter()Keeps only the spans matching every active filter.ProfileSearch
fromQueryParams() staticBuilds the search model from the submitted filter values.ProfileSearch
info()Returns the submitted info filter value.ProfileSearch
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 duration(): string

Returns the submitted duration filter value.

Returns

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

public function filter(list<PHPForge\Debug\Panel\Profile\ProfileRow> $rows): list<PHPForge\Debug\Panel\Profile\ProfileRow>

Keeps only the spans matching every active filter.

Parameters

ParameterTypeDescription
$rowslist<PHPForge\Debug\Panel\Profile\ProfileRow>Captured spans to filter.

Returns

list<PHPForge\Debug\Panel\Profile\ProfileRow>: 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 span filters.

public function info(): string

Returns the submitted info filter value.

Returns

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