Simple PSR-7 response emitter with sensible CLI SAPI output
Installation via composer:
composer require tomrf/http-emitter
$httpEmitter = new HttpEmitter();
$httpEmitter->emit($response); // PSR-7 response object
composer test
This project is released under the MIT License (MIT). See LICENSE for more information.
- Tomrf\HttpEmitter\HttpEmitter
- Tomrf\HttpEmitter\Sapi\SapiCliEmitter
- Tomrf\HttpEmitter\Sapi\SapiEmitter
PSR-7 message response emitter.
Emits the response using SapiEmitter or SapiCliEmitter based on current PHP SAPI.
public function emit(
Psr\Http\Message\ResponseInterface $response
): void
PSR-7 message response emitter for SAPI cli.
Emits the response to terminal.
public function emit(
Psr\Http\Message\ResponseInterface $response
): void
Generic PSR-7 message response emitter for SAPI.
Emits the response to standard output.
public function emit(
Psr\Http\Message\ResponseInterface $response
): void
Generated 2022-06-15T23:05:29+02:00 using 📚tomrf/readme-gen