NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Interface StreamRequestFactoryInterface

Interface used for creating streams from requests

### Direct known implementers

`Guzzle\Stream\PhpStreamRequestFactory`

Namespace: Guzzle\Stream
Located at Guzzle/Stream/StreamRequestFactoryInterface.php

## Methods summary

- `public` `fromRequest ( Guzzle\Http\Message\RequestInterface $request, array|resource $context = array(), array $params = array() )`

  Create a stream based on a request object

## Methods detail

# `public `Guzzle\Stream\StreamInterface``
`fromRequest( `Guzzle\Http\Message\RequestInterface` $request, array|resource $context = array(), array $params = array() )`

Create a stream based on a request object

#### Parameters

$request
  ``Guzzle\Http\Message\RequestInterface``
  $request Base the stream on a request
$context
  `array|resource`
  $context A stream_context_options resource or array of parameters used to create a stream context.
$params
  `array`
  $params Optional array of parameters specific to the factory

#### Returns

``Guzzle\Stream\StreamInterface``
Returns a stream object

#### Throws

``Guzzle\Common\Exception\RuntimeException``
if the stream cannot be opened or an error occurs

### Magic methods summary