ToolbarDataAction
API reference › Yii3 Debug › Action › ToolbarDataAction
Serves the toolbar payload for a captured request.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates the toolbar-data endpoint, optionally backed by retained captures. | ToolbarDataAction |
__invoke() | Serves the toolbar payload for the capture the query parameters select. | ToolbarDataAction |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(Yii3\Debug\ToolbarDataFactory $dataFactory, Psr\Http\Message\ResponseFactoryInterface $responseFactory, Psr\Http\Message\StreamFactoryInterface $streamFactory, PHPForge\Debug\Storage\SnapshotStore|null $store = null)Creates the toolbar-data endpoint, optionally backed by retained captures.
Parameters
| Parameter | Type | Description |
|---|---|---|
$dataFactory | Yii3\ | Factory building the toolbar payload. |
$responseFactory | Psr\ | Factory building the PSR-7 response. |
$streamFactory | Psr\ | Factory building the PSR-7 response body. |
$store | PHPForge\ | Store the capture is read from, or null when none is configured. |
__invoke()
Section titled “__invoke() ”public function __invoke(Psr\Http\Message\ServerRequestInterface $request): Psr\Http\Message\ResponseInterfaceServes the toolbar payload for the capture the query parameters select.
Parameters
| Parameter | Type | Description |
|---|---|---|
$request | Psr\ | Incoming request carrying the query parameters. |
Returns
Psr\Http\Message\ResponseInterface: JSON toolbar payload, or an error response when the capture is missing.
Throws
JsonException: when the toolbar payload cannot be encoded.