rstgroup/diagnostics-middleware

ZendDiagnostics PSR-7 middleware

1.3.0 2017-12-28 09:25 UTC

This package is not auto-updated.

Last update: 2024-10-26 19:53:41 UTC


README

ZendDiagnostics PSR-7 middleware

Usage

Create your middleware and add it to middleware stack:

$runner = new ZendDiagnostics\Runner\Runner();
// add checks to your diagnostics runner

// Create response output factory
$factory = new RstGroup\DiagnosticsMiddleware\ResultResponseFactory\JsonResultResponseFactory();

// Create middleware
$middleware = new RstGroup\DiagnosticsMiddleware\DiagnosticsMiddleware();

// add to your middeware runner
$app = new MiddlewareRunner();
$app->add($middleware);
$app->run();

We provide factories (using container-interop) and config provider, so implementation should be easy withzend-expressive or other PSR-7 middleware framework.

Installation

Add project name (rstgroup/diagnostics-middleware) to composer.json.