RequestFactory.php 827 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Http\Message;
  3. use Psr\Http\Message\UriInterface;
  4. use Psr\Http\Message\RequestInterface;
  5. use Psr\Http\Message\StreamInterface;
  6. /**
  7. * Factory for PSR-7 Request.
  8. *
  9. * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
  10. */
  11. interface RequestFactory
  12. {
  13. /**
  14. * Creates a new PSR-7 request.
  15. *
  16. * @param string $method
  17. * @param string|UriInterface $uri
  18. * @param array $headers
  19. * @param resource|string|StreamInterface|null $body
  20. * @param string $protocolVersion
  21. *
  22. * @return RequestInterface
  23. */
  24. public function createRequest(
  25. $method,
  26. $uri,
  27. array $headers = [],
  28. $body = null,
  29. $protocolVersion = '1.1'
  30. );
  31. }