Skip to content
PHP Ecosystem
Explore

RequestObserverInterface

API reference › Yii3 Debug › Collector › RequestObserverInterface

interfaceYii3\Debug\Collector\RequestObserverInterface
Sourcesrc/Collector/RequestObserverInterface.php
Implemented by 2 types

Optional host-local request hooks for registered collectors, independent of any extension ID.

MethodDescriptionDefined by
collectRequest() abstractRecords the incoming request.RequestObserverInterface
collectResponse() abstractRecords the outgoing response.RequestObserverInterface
abstract public function collectRequest(Psr\Http\Message\ServerRequestInterface $request): void

Records the incoming request.

Parameters

ParameterTypeDescription
$requestPsr\Http\Message\ServerRequestInterfaceRequest reaching the debugger middleware.
abstract public function collectResponse(Psr\Http\Message\ResponseInterface $response): void

Records the outgoing response.

Parameters

ParameterTypeDescription
$responsePsr\Http\Message\ResponseInterfaceResponse produced for the captured request.