final class FrameworkHealthFastPath (View source)

Serves an eligible public framework health request before the full HTTP bootstrap runs.

Unsupported, unmatched or protected requests return null and continue through the standard lifecycle.

Methods

__construct(ResponseInterface $response)

Captures the response that CORS middleware must decorate without dispatching a controller.

ResponseInterface|null
tryHandle(ServerRequestInterface $request)

Returns a complete health response when the request is eligible, or null to defer normal dispatch.

ResponseInterface|null
ResponseInterface
handle(ServerRequestInterface $request)

Returns the captured health response unchanged to the surrounding middleware.

ResponseInterface

Details

__construct

__construct(ResponseInterface $response)

Captures the response that CORS middleware must decorate without dispatching a controller.

Parameters

ResponseInterface $response

tryHandle

ResponseInterface|null tryHandle(ServerRequestInterface $request)

Returns a complete health response when the request is eligible, or null to defer normal dispatch.

Parameters

ServerRequestInterface $request

Return Value

ResponseInterface|null

Exceptions

JsonException
RuntimeException

handle

ResponseInterface handle(ServerRequestInterface $request)

Returns the captured health response unchanged to the surrounding middleware.

Parameters

ServerRequestInterface $request

Return Value

ResponseInterface