Download the PHP package orbiter/middleware-utils without Composer
On this page you can find all versions of the php package orbiter/middleware-utils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package middleware-utils
Middleware Utils
Utilities and middlewares for PSR-7/17, PSR-15 middleware systems for usage with PHP-DI.
HasResponseFactory
Adds a response factory to a middleware with various factory methods, relies on DI-injection of Psr\Http\Message\ResponseFactoryInterface
and Psr\Http\Message\StreamFactoryInterface
.
createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
- create any empty responserespondJson(ResponseInterface $response, $data): ResponseInterface
- uses the response and adds header and datacreate400(): ResponseInterface
- Bad Requestcreate401(): ResponseInterface
- Unauthorizedcreate402(): ResponseInterface
- Payment Requiredcreate403(): ResponseInterface
- Forbiddencreate404(): ResponseInterface
- Not Foundcreate405(): ResponseInterface
- Method Not Allowedcreate409(): ResponseInterface
- Conflictcreate410(): ResponseInterface
- Gonecreate413(): ResponseInterface
- Payload Too Largecreate415(): ResponseInterface
- Unsupported Media Typecreate440(): ResponseInterface
- Login Time-outcreate500(): ResponseInterface
- Internal Server Errorcreate501(): ResponseInterface
- Not Implementedcreate502(): ResponseInterface
- Bad Gatewaycreate503(): ResponseInterface
- Service Unavailable
ApiError
Unified error body:
CorsMiddleware
Dead-Simple CORS middleware, support multiple origins.
Create the middleware with any DI-factory, add to any middleware pipe.
CORSMiddleware Zend-Expressive
License
This project is free software distributed under the MIT License.
See: LICENSE.
Contributors
By committing your code to the code repository you agree to release the code under the MIT License attached to the repository.
Maintained by Michael Becker
All versions of middleware-utils with dependencies
ext-json Version *
psr/http-server-middleware Version ^1.0
psr/http-server-handler Version ^1.0
psr/http-message Version ^1.0
php-di/php-di Version 6.*