Skip to content
PHP Ecosystem
Explore

ToolbarDataAction

API reference › Yii3 Debug › Action › ToolbarDataAction

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

Serves the toolbar payload for a captured request.

MethodDescriptionDefined 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
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

ParameterTypeDescription
$dataFactoryYii3\Debug\ToolbarDataFactoryFactory building the toolbar payload.
$responseFactoryPsr\Http\Message\ResponseFactoryInterfaceFactory building the PSR-7 response.
$streamFactoryPsr\Http\Message\StreamFactoryInterfaceFactory building the PSR-7 response body.
$storePHPForge\Debug\Storage\SnapshotStore|nullStore the capture is read from, or null when none is configured.
public function __invoke(Psr\Http\Message\ServerRequestInterface $request): Psr\Http\Message\ResponseInterface

Serves the toolbar payload for the capture the query parameters select.

Parameters

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

Returns

Psr\Http\Message\ResponseInterface: JSON toolbar payload, or an error response when the capture is missing.

Throws