1 <?php
2
3 namespace Http\Message;
4
5 use Psr\Http\Message\RequestInterface;
6 use Psr\Http\Message\ResponseInterface;
7
8 /**
9 * Formats a request and/or a response as a string.
10 *
11 * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
12 */
13 interface Formatter
14 {
15 /**
16 * Formats a request.
17 *
18 * @param RequestInterface $request
19 *
20 * @return string
21 */
22 public function formatRequest(RequestInterface $request);
23
24 /**
25 * Formats a response.
26 *
27 * @param ResponseInterface $response
28 *
29 * @return string
30 */
31 public function formatResponse(ResponseInterface $response);
32 }
33