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

  • CurlHandle
  • CurlMulti
  • CurlMultiProxy
  • CurlVersion
  • RequestMediator

Interfaces

  • CurlMultiInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class CurlHandle

Immutable wrapper for a cURL handle

Namespace: Guzzle\Http\Curl
Located at src/Guzzle/Http/Curl/CurlHandle.php
Methods summary
public static Guzzle\Http\Curl\CurlHandle
# factory( Guzzle\Http\Message\RequestInterface $request )

Factory method to create a new curl handle based on an HTTP request.

Factory method to create a new curl handle based on an HTTP request.

There are some helpful options you can set to enable specific behavior: - debug: Set to true to enable cURL debug functionality to track the actual headers sent over the wire. - progress: Set to true to enable progress function callbacks.

Parameters

$request
Request

Returns

Guzzle\Http\Curl\CurlHandle

Throws

RuntimeException
public
# __construct( resource $handle, Guzzle\Common\Collection|array $options )

Construct a new CurlHandle object that wraps a cURL handle

Construct a new CurlHandle object that wraps a cURL handle

Parameters

$handle
Configured cURL handle resource
$options
Curl options to use with the handle

Throws

InvalidArgumentException
public
# __destruct( )

Destructor

Destructor

public
# close( )

Close the curl handle

Close the curl handle

public boolean
# isAvailable( )

Check if the handle is available and still OK

Check if the handle is available and still OK

Returns

boolean
public string
# getError( )

Get the last error that occurred on the cURL handle

Get the last error that occurred on the cURL handle

Returns

string
public integer
# getErrorNo( )

Get the last error number that occurred on the cURL handle

Get the last error number that occurred on the cURL handle

Returns

integer
public Guzzle\Http\Curl\CurlHandle
# setErrorNo( integer $error )

Set the curl error number

Set the curl error number

Parameters

$error
Error number to set

Returns

Guzzle\Http\Curl\CurlHandle
public array|mixed
# getInfo( integer $option = null )

Get cURL curl_getinfo data

Get cURL curl_getinfo data

Parameters

$option
Option to retrieve. Pass null to retrieve all data as an array.

Returns

array|mixed
public string|resource|null
# getStderr( boolean $asResource = false )

Get the stderr output

Get the stderr output

Parameters

$asResource
Set to TRUE to get an fopen resource

Returns

string|resource|null
public Guzzle\Http\Url
# getUrl( )

Get the URL that this handle is connecting to

Get the URL that this handle is connecting to

Returns

Guzzle\Http\Url
public resource|null
# getHandle( )

Get the wrapped curl handle

Get the wrapped curl handle

Returns

resource|null
Returns the cURL handle or null if it was closed
public Guzzle\Common\Collection
# getOptions( )

Get the cURL setopt options of the handle. Changing values in the return object will have no effect on the curl handle after it is created.

Get the cURL setopt options of the handle. Changing values in the return object will have no effect on the curl handle after it is created.

Returns

Guzzle\Common\Collection
public
# updateRequestFromTransfer( Guzzle\Http\Message\RequestInterface $request )

Update a request based on the log messages of the CurlHandle

Update a request based on the log messages of the CurlHandle

Parameters

$request
Request to update
public static array
# parseCurlConfig( array|Guzzle\Common\Collection $config )

Parse the config and replace curl.* configurators into the constant based values so it can be used elsewhere

Parse the config and replace curl.* configurators into the constant based values so it can be used elsewhere

Parameters

$config
The configuration we want to parse

Returns

array
Constants summary
string BODY_AS_STRING
# 'body_as_string'
string PROGRESS
# 'progress'
string DEBUG
# 'debug'
Properties summary
protected Guzzle\Common\Collection $options

Curl options

Curl options

#
protected resource $handle

Curl resource handle

Curl resource handle

#
protected integer $errorNo

CURLE_* error

CURLE_* error

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