Skip to content
PHP Ecosystem
Explore

DbSummaryRenderer

API reference › Debug Core › Panel › Db › DbSummaryRenderer

final classPHPForge\Debug\Panel\Db\DbSummaryRenderer
Sourcesrc/Panel/Db/DbSummaryRenderer.php

Renders request-wide Database totals independently of adapter grid widgets.

MethodDescriptionDefined by
render() staticRenders the grid summary header with the request-wide totals and the optional page-size selector.DbSummaryRenderer
toolbarTitle() staticBuilds the toolbar chip title, reporting the executed query count or the active warning sentences.DbSummaryRenderer
public static function render(PHPForge\Debug\Panel\Db\DbSummary $summary, string|null $pageSize = null): string

Renders the grid summary header with the request-wide totals and the optional page-size selector.

Parameters

ParameterTypeDescription
$summaryDbSummaryRequest-wide Database metrics.
$pageSizestring|nullRendered page-size selector appended after the totals, or null to omit it.

Returns

string: Summary header markup.

public static function toolbarTitle(PHPForge\Debug\Panel\Db\DbSummary $summary, int|null $criticalQueryThreshold, int|null $excessiveCallerThreshold): string

Builds the toolbar chip title, reporting the executed query count or the active warning sentences.

Warnings replace the count entirely: the critical-count sentence comes first, the excessive-caller sentence second, and both are joined by a newline when they apply together.

Parameters

ParameterTypeDescription
$summaryDbSummaryRequest-wide Database metrics.
$criticalQueryThresholdint|nullQuery count above which the request is critical, or null to disable.
$excessiveCallerThresholdint|nullStatements per call site that flag it, or null to disable.

Returns

string: Warning sentences when a threshold is exceeded, otherwise the executed-query count.