Skip to content

Commit 40b7cb8

Browse files
committed
Add formatter interface
1 parent f3a36b2 commit 40b7cb8

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/Formatter.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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 <[email protected]>
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+
}

0 commit comments

Comments
 (0)