Skip to content
PHP Ecosystem
Explore

DbExplainAction

API reference › Yii3 Debug › Action › DbExplainAction

final readonly classYii3\Debug\Action\DbExplainAction
ImplementsDebugActionInterface
Sourcesrc/Action/DbExplainAction.php

Serves a plan for a stored query selected by tag and sequence, never for SQL supplied by the request.

MethodDescriptionDefined by
__construct()Creates the query-plan endpoint for statements retained in captured snapshots.DbExplainAction
__invoke()Renders the plan for the stored statement the tag and sequence select.DbExplainAction
public function __construct(PHPForge\Debug\Storage\SnapshotStore $store, Yii3\Debug\Db\DbExplain $explain, Psr\Http\Message\ResponseFactoryInterface $responseFactory, Psr\Http\Message\StreamFactoryInterface $streamFactory)

Creates the query-plan endpoint for statements retained in captured snapshots.

Parameters

ParameterTypeDescription
$storePHPForge\Debug\Storage\SnapshotStoreStore the captured snapshots are read from.
$explainYii3\Debug\Db\DbExplainRunner producing the plan for a stored statement.
$responseFactoryPsr\Http\Message\ResponseFactoryInterfaceFactory building the PSR-7 response.
$streamFactoryPsr\Http\Message\StreamFactoryInterfaceFactory building the PSR-7 response body.
public function __invoke(Psr\Http\Message\ServerRequestInterface $request): Psr\Http\Message\ResponseInterface

Renders the plan for the stored statement the tag and sequence select.

Parameters

ParameterTypeDescription
$requestPsr\Http\Message\ServerRequestInterfaceIncoming request carrying the query parameters.

Returns

Psr\Http\Message\ResponseInterface: Rendered page, or a 404 response when the capture is missing.