Overview

Namespaces

  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
    • Tests
      • Batch
      • Cache
      • Common
        • Cache
        • Exception
      • Http
        • Curl
        • Exception
        • Message
          • Header
      • Inflection
      • Iterator
      • Log
      • Message
      • Mock
      • Parser
        • Cookie
        • Message
      • Parsers
        • UriTemplate
      • Plugin
        • Async
        • Backoff
        • Cache
        • Cookie
          • CookieJar
        • CurlAuth
        • ErrorResponse
        • History
        • Log
        • Md5
        • Mock
        • Oauth
        • Redirect
      • Service
        • Builder
        • Command
          • LocationVisitor
            • Request
            • Response
        • Description
        • Exception
        • Mock
          • Command
            • Sub
          • Model
        • Resource
      • Stream
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • VivaPayments
      • Message
  • PHP

Classes

  • PhpStreamRequestFactory
  • Stream

Interfaces

  • StreamInterface
  • StreamRequestFactoryInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class PhpStreamRequestFactory

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.

Guzzle\Stream\PhpStreamRequestFactory implements Guzzle\Stream\StreamRequestFactoryInterface
Namespace: Guzzle\Stream
Located at src/Guzzle/Stream/PhpStreamRequestFactory.php
Methods summary
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

Create a stream based on a request object

The $params array can contain the following custom keys specific to the PhpStreamRequestFactory: - stream_class: The name of a class to create instead of a Guzzle\Stream\Stream object

Parameters

$request
Base the stream on a request
$context

A stream_context_options resource or array of parameters used to create a stream context.

$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

Implementation of

Guzzle\Stream\StreamRequestFactoryInterface::fromRequest()
protected
# setContextValue( string $wrapper, string $name, mixed $value, boolean $overwrite = false )

Set an option on the context and the internal options array

Set an option on the context and the internal options array

Parameters

$wrapper
Stream wrapper name of http
$name
Context name
$value
Context value
$overwrite
Set to true to overwrite an existing value
protected
# createContext( array $params )

Create a stream context

Create a stream context

Parameters

$params
Parameter array
public array
# getLastResponseHeaders( )

Get the last response headers received by the HTTP request

Get the last response headers received by the HTTP request

Returns

array
protected
# addDefaultContextOptions( Guzzle\Http\Message\RequestInterface $request )

Adds the default context options to the stream context options

Adds the default context options to the stream context options

Parameters

$request
Request
protected
# setUrl( Guzzle\Http\Message\RequestInterface $request )

Set the URL to use with the factory

Set the URL to use with the factory

Parameters

$request
Request that owns the URL
protected
# addSslOptions( Guzzle\Http\Message\RequestInterface $request )

Add SSL options to the stream context

Add SSL options to the stream context

Parameters

$request
Request
protected
# addBodyOptions( Guzzle\Http\Message\RequestInterface $request )

Add body (content) specific options to the context options

Add body (content) specific options to the context options

Parameters

$request
protected
# addProxyOptions( Guzzle\Http\Message\RequestInterface $request )

Add proxy parameters to the context if needed

Add proxy parameters to the context if needed

Parameters

$request
Request
protected Guzzle\Stream\StreamInterface
# createStream( array $params )

Create the stream for the request with the context options

Create the stream for the request with the context options

Parameters

$params
Parameters of the stream

Returns

Guzzle\Stream\StreamInterface
protected
# processResponseHeaders( Guzzle\Stream\StreamInterface $stream )

Process response headers

Process response headers

Parameters

$stream
protected resource
# createResource( callable $callback )

Create a resource and check to ensure it was created successfully

Create a resource and check to ensure it was created successfully

Parameters

$callback
Closure to invoke that must return a valid resource

Returns

resource

Throws

RuntimeException
on error
Properties summary
protected resource $context

Stream context options

Stream context options

#
protected array $contextOptions

Stream context

Stream context

#
protected Guzzle\Http\Url $url

Stream URL

Stream URL

#
protected array $lastResponseHeaders

Last response headers received by the HTTP request

Last response headers received by the HTTP request

#
Omnipay Viva Payments Gateway Module API Documentation API documentation generated by ApiGen