Formatter.php 623 B

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