4 * @see https://github.com/laminas/laminas-httphandlerrunner for the canonical source repository
5 * @copyright https://github.com/laminas/laminas-httphandlerrunner/blob/master/COPYRIGHT.md
6 * @license https://github.com/laminas/laminas-httphandlerrunner/blob/master/LICENSE.md New BSD License
9 declare(strict_types=1);
11 namespace Laminas\HttpHandlerRunner\Emitter;
13 use Psr\Http\Message\ResponseInterface;
15 interface EmitterInterface
20 * Emits a response, including status line, headers, and the message body,
21 * according to the environment.
23 * Implementations of this method may be written in such a way as to have
24 * side effects, such as usage of header() or pushing output to the
27 * Implementations MAY raise exceptions if they are unable to emit the
28 * response; e.g., if headers have already been sent.
30 * Implementations MUST return a boolean. A boolean `true` indicates that
31 * the emitter was able to emit the response, while `false` indicates
34 public function emit(ResponseInterface $response) : bool;