PHP code example of rstgroup / diagnostics-middleware
1. Go to this page and download the library: Download rstgroup/diagnostics-middleware library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rstgroup / diagnostics-middleware example snippets
$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();