StreamRequestFactoryInterface.php 859 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Guzzle\Stream;
  3. use Guzzle\Http\Message\RequestInterface;
  4. /**
  5. * Interface used for creating streams from requests
  6. */
  7. interface StreamRequestFactoryInterface
  8. {
  9. /**
  10. * Create a stream based on a request object
  11. *
  12. * @param RequestInterface $request Base the stream on a request
  13. * @param array|resource $context A stream_context_options resource or array of parameters used to create a
  14. * stream context.
  15. * @param array $params Optional array of parameters specific to the factory
  16. *
  17. * @return StreamInterface Returns a stream object
  18. * @throws \Guzzle\Common\Exception\RuntimeException if the stream cannot be opened or an error occurs
  19. */
  20. public function fromRequest(RequestInterface $request, $context = array(), array $params = array());
  21. }