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 objectcomposer testThis 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
): voidPSR-7 message response emitter for SAPI cli.
Emits the response to terminal.
public function emit(
    Psr\Http\Message\ResponseInterface $response
): voidGeneric PSR-7 message response emitter for SAPI.
Emits the response to standard output.
public function emit(
    Psr\Http\Message\ResponseInterface $response
): voidGenerated 2022-06-15T23:05:29+02:00 using 📚tomrf/readme-gen