3 * @see https://github.com/zendframework/zend-diactoros for the canonical source repository
4 * @copyright Copyright (c) 2015-2018 Zend Technologies USA Inc. (https://www.zend.com)
5 * @license https://github.com/zendframework/zend-diactoros/blob/master/LICENSE.md New BSD License
8 namespace Zend\Diactoros\Response;
10 use Psr\Http\Message\ResponseInterface;
13 * @deprecated since 1.8.0. The package zendframework/zend-httphandlerrunner
14 * now provides this functionality.
16 interface EmitterInterface
21 * Emits a response, including status line, headers, and the message body,
22 * according to the environment.
24 * Implementations of this method may be written in such a way as to have
25 * side effects, such as usage of header() or pushing output to the
28 * Implementations MAY raise exceptions if they are unable to emit the
29 * response; e.g., if headers have already been sent.
31 * @param ResponseInterface $response
33 public function emit(ResponseInterface $response);