Skip to content
PHP Ecosystem
Explore

DbExplainRenderer

API reference › Debug Core › Panel › Db › DbExplainRenderer

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

Renders a database EXPLAIN plan with the shared debugger table contract.

MethodDescriptionDefined by
render() staticRenders the explained SQL statement and its driver-specific result rows.DbExplainRenderer
renderError() staticRenders a failed EXPLAIN attempt without escaping the shared panel contract.DbExplainRenderer
public static function render(string $query, array<array-key, array<array-key, mixed>> $results): string

Renders the explained SQL statement and its driver-specific result rows.

Parameters

ParameterTypeDescription
$querystringSQL statement passed to EXPLAIN.
$resultsarray<array-key, array<array-key, mixed>>Driver result rows.

Returns

string

public static function renderError(string $query, string $message): string

Renders a failed EXPLAIN attempt without escaping the shared panel contract.

Parameters

ParameterTypeDescription
$querystring
$messagestring

Returns

string