DbExplainAction
API reference › Yii3 Debug › Action › DbExplainAction
Serves a plan for a stored query selected by tag and sequence, never for SQL supplied by the request.
Methods
Section titled “Methods”| Method | Description | Defined 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 |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”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
| Parameter | Type | Description |
|---|---|---|
$store | PHPForge\ | Store the captured snapshots are read from. |
$explain | Yii3\ | Runner producing the plan for a stored statement. |
$responseFactory | Psr\ | Factory building the PSR-7 response. |
$streamFactory | Psr\ | Factory building the PSR-7 response body. |
__invoke()
Section titled “__invoke() ”public function __invoke(Psr\Http\Message\ServerRequestInterface $request): Psr\Http\Message\ResponseInterfaceRenders the plan for the stored statement the tag and sequence select.
Parameters
| Parameter | Type | Description |
|---|---|---|
$request | Psr\ | Incoming request carrying the query parameters. |
Returns
Psr\Http\Message\ResponseInterface: Rendered page, or a 404 response when the capture is missing.