https://github.com/rstgroup/diagnostics-middleware
ZendDiagnostics PSR-7 middleware
https://github.com/rstgroup/diagnostics-middleware
php psr-7 zend-framework
Last synced: 12 months ago
JSON representation
ZendDiagnostics PSR-7 middleware
- Host: GitHub
- URL: https://github.com/rstgroup/diagnostics-middleware
- Owner: rstgroup
- License: gpl-3.0
- Created: 2016-03-15T16:41:47.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-12-28T09:25:31.000Z (over 8 years ago)
- Last Synced: 2025-04-12T19:08:55.264Z (12 months ago)
- Topics: php, psr-7, zend-framework
- Language: PHP
- Size: 31.3 KB
- Stars: 3
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# diagnostics-middleware [](https://travis-ci.org/rstgroup/diagnostics-middleware)
ZendDiagnostics PSR-7 middleware
## Usage
Create your middleware and add it to middleware stack:
```php
$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`](https://github.com/container-interop/container-interop)) and config
provider, so implementation should be easy with[`zend-expressive`](https://github.com/zendframework/zend-expressive)
or other PSR-7 middleware framework.
## Installation
Add project name (`rstgroup/diagnostics-middleware`) to composer.json.