Open Journal Systems
3.3.0
|
Public Member Functions | |
fromRequest (RequestInterface $request, $context=array(), array $params=array()) | |
getLastResponseHeaders () | |
Protected Member Functions | |
addBodyOptions (RequestInterface $request) | |
addDefaultContextOptions (RequestInterface $request) | |
addProxyOptions (RequestInterface $request) | |
addSslOptions (RequestInterface $request) | |
createContext (array $params) | |
createResource ($callback) | |
createStream (array $params) | |
processResponseHeaders (StreamInterface $stream) | |
setContextValue ($wrapper, $name, $value, $overwrite=false) | |
setUrl (RequestInterface $request) | |
Protected Attributes | |
$context | |
$contextOptions | |
$lastResponseHeaders | |
$url | |
Factory used to create fopen streams using PHP's http and https stream wrappers
Note: PHP's http stream wrapper only supports streaming downloads. It does not support streaming uploads.
Definition at line 16 of file PhpStreamRequestFactory.php.
|
protected |
Add body (content) specific options to the context options
RequestInterface | $request |
Definition at line 183 of file PhpStreamRequestFactory.php.
References Guzzle\Stream\PhpStreamRequestFactory\setContextValue().
Referenced by Guzzle\Stream\PhpStreamRequestFactory\fromRequest().
|
protected |
Adds the default context options to the stream context options
RequestInterface | $request | Request |
Definition at line 126 of file PhpStreamRequestFactory.php.
References Guzzle\Http\Message\MessageInterface\getHeaderLines(), Guzzle\Http\Message\RequestInterface\getMethod(), Guzzle\Http\Message\RequestInterface\getProtocolVersion(), Guzzle\Http\Message\MessageInterface\hasHeader(), and Guzzle\Stream\PhpStreamRequestFactory\setContextValue().
Referenced by Guzzle\Stream\PhpStreamRequestFactory\fromRequest().
|
protected |
Add proxy parameters to the context if needed
RequestInterface | $request | Request |
Definition at line 209 of file PhpStreamRequestFactory.php.
References Guzzle\Http\Message\RequestInterface\getCurlOptions(), and Guzzle\Stream\PhpStreamRequestFactory\setContextValue().
Referenced by Guzzle\Stream\PhpStreamRequestFactory\fromRequest().
|
protected |
Add SSL options to the stream context
RequestInterface | $request | Request |
Definition at line 166 of file PhpStreamRequestFactory.php.
References Guzzle\Http\Message\RequestInterface\getCurlOptions(), and Guzzle\Stream\PhpStreamRequestFactory\setContextValue().
Referenced by Guzzle\Stream\PhpStreamRequestFactory\fromRequest().
|
protected |
Create a stream context
array | $params | Parameter array |
Definition at line 103 of file PhpStreamRequestFactory.php.
References Guzzle\Stream\PhpStreamRequestFactory\$contextOptions, and Guzzle\Stream\PhpStreamRequestFactory\createResource().
Referenced by Guzzle\Stream\PhpStreamRequestFactory\fromRequest().
|
protected |
Create a resource and check to ensure it was created successfully
callable | $callback | Closure to invoke that must return a valid resource |
RuntimeException | on error |
Definition at line 270 of file PhpStreamRequestFactory.php.
Referenced by Guzzle\Stream\PhpStreamRequestFactory\createContext(), and Guzzle\Stream\PhpStreamRequestFactory\createStream().
|
protected |
Create the stream for the request with the context options
array | $params | Parameters of the stream |
Definition at line 223 of file PhpStreamRequestFactory.php.
References Guzzle\Stream\PhpStreamRequestFactory\$context, Guzzle\Stream\PhpStreamRequestFactory\$url, Guzzle\Stream\PhpStreamRequestFactory\createResource(), and Guzzle\Stream\PhpStreamRequestFactory\processResponseHeaders().
Referenced by Guzzle\Stream\PhpStreamRequestFactory\fromRequest().
Guzzle\Stream\PhpStreamRequestFactory::fromRequest | ( | RequestInterface | $request, |
$context = array() , |
|||
array | $params = array() |
||
) |
{Create a stream based on a request object
RequestInterface | $request | Base the stream on a request |
array | resource | $context | A stream_context_options resource or array of parameters used to create a stream context. |
array | $params | Optional array of parameters specific to the factory |
The $params array can contain the following custom keys specific to the PhpStreamRequestFactory:
Implements Guzzle\Stream\StreamRequestFactoryInterface.
Definition at line 48 of file PhpStreamRequestFactory.php.
References Guzzle\Stream\PhpStreamRequestFactory\$context, Guzzle\Stream\PhpStreamRequestFactory\addBodyOptions(), Guzzle\Stream\PhpStreamRequestFactory\addDefaultContextOptions(), Guzzle\Stream\PhpStreamRequestFactory\addProxyOptions(), Guzzle\Stream\PhpStreamRequestFactory\addSslOptions(), Guzzle\Stream\PhpStreamRequestFactory\createContext(), Guzzle\Stream\PhpStreamRequestFactory\createStream(), Guzzle\Common\HasDispatcherInterface\dispatch(), Guzzle\Stream\PhpStreamRequestFactory\getLastResponseHeaders(), and Guzzle\Stream\PhpStreamRequestFactory\setUrl().
Guzzle\Stream\PhpStreamRequestFactory::getLastResponseHeaders | ( | ) |
Get the last response headers received by the HTTP request
Definition at line 116 of file PhpStreamRequestFactory.php.
References Guzzle\Stream\PhpStreamRequestFactory\$lastResponseHeaders.
Referenced by Guzzle\Stream\PhpStreamRequestFactory\fromRequest().
|
protected |
Process response headers
StreamInterface | $stream |
Definition at line 252 of file PhpStreamRequestFactory.php.
Referenced by Guzzle\Stream\PhpStreamRequestFactory\createStream().
|
protected |
Set an option on the context and the internal options array
string | $wrapper | Stream wrapper name of http |
string | $name | Context name |
mixed | $value | Context value |
bool | $overwrite | Set to true to overwrite an existing value |
Definition at line 87 of file PhpStreamRequestFactory.php.
Referenced by Guzzle\Stream\PhpStreamRequestFactory\addBodyOptions(), Guzzle\Stream\PhpStreamRequestFactory\addDefaultContextOptions(), Guzzle\Stream\PhpStreamRequestFactory\addProxyOptions(), and Guzzle\Stream\PhpStreamRequestFactory\addSslOptions().
|
protected |
Set the URL to use with the factory
RequestInterface | $request | Request that owns the URL |
Definition at line 146 of file PhpStreamRequestFactory.php.
References Guzzle\Http\Message\RequestInterface\getPassword(), Guzzle\Http\Message\RequestInterface\getUrl(), and Guzzle\Http\Message\RequestInterface\getUsername().
Referenced by Guzzle\Stream\PhpStreamRequestFactory\fromRequest().
|
protected |
Stream context options
Definition at line 22 of file PhpStreamRequestFactory.php.
Referenced by Guzzle\Stream\PhpStreamRequestFactory\createStream(), and Guzzle\Stream\PhpStreamRequestFactory\fromRequest().
|
protected |
Stream context
Definition at line 28 of file PhpStreamRequestFactory.php.
Referenced by Guzzle\Stream\PhpStreamRequestFactory\createContext().
|
protected |
Last response headers received by the HTTP request
Definition at line 40 of file PhpStreamRequestFactory.php.
Referenced by Guzzle\Stream\PhpStreamRequestFactory\getLastResponseHeaders().
|
protected |
Stream URL
Definition at line 34 of file PhpStreamRequestFactory.php.
Referenced by Guzzle\Stream\PhpStreamRequestFactory\createStream().