Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rstgroup/diagnostics-middleware
ZendDiagnostics PSR-7 middleware
https://github.com/rstgroup/diagnostics-middleware
php psr-7 zend-framework
Last synced: 27 days 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 (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-28T09:25:31.000Z (almost 7 years ago)
- Last Synced: 2024-04-13T19:29:39.784Z (8 months ago)
- Topics: php, psr-7, zend-framework
- Language: PHP
- Size: 31.3 KB
- Stars: 3
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# diagnostics-middleware [![Build Status](https://travis-ci.org/rstgroup/diagnostics-middleware.svg?branch=master)](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.