Overview
  • Namespace
  • Class

Namespaces

  • PayPal
    • Api
    • Auth
    • Cache
    • Common
    • Converter
    • Core
    • Exception
    • Handler
    • Log
    • Rest
    • Security
    • Transport
    • Validation

Classes

  • PayPalConfigManager
  • PayPalConstants
  • PayPalCredentialManager
  • PayPalHttpConfig
  • PayPalHttpConnection
  • PayPalLoggingManager

Class PayPalHttpConfig

Class PayPalHttpConfig Http Configuration Class

Namespace: PayPal\Core
Package: PayPal\Core
Located at PayPal/Core/PayPalHttpConfig.php

Methods summary

public
# __construct( string $url = null, string $method = PayPal\Core\PayPalHttpConfig::HTTP_POST, array $configs = array() )

Default Constructor

Default Constructor

Parameters

$url
$method
HTTP method (GET, POST etc) defaults to POST
$configs
All Configurations
public null|string
# getUrl( )

Gets Url

Gets Url

Returns

null|string
public string
# getMethod( )

Gets Method

Gets Method

Returns

string
public array
# getHeaders( )

Gets all Headers

Gets all Headers

Returns

array
public string|null
# getHeader( $name )

Get Header by Name

Get Header by Name

Parameters

$name

Returns

string|null
public
# setUrl( $url )

Sets Url

Sets Url

Parameters

$url
public
# setHeaders( array $headers = array() )

Set Headers

Set Headers

Parameters

$headers
public
# addHeader( $name, $value, boolean $overWrite = true )

Adds a Header

Adds a Header

Parameters

$name
$value
$overWrite
allows you to override header value
public
# removeHeader( $name )

Removes a Header

Removes a Header

Parameters

$name
public array
# getCurlOptions( )

Gets all curl options

Gets all curl options

Returns

array
public
# addCurlOption( string $name, mixed $value )

Add Curl Option

Add Curl Option

Parameters

$name
$value
public
# removeCurlOption( $name )

Removes a curl option from the list

Removes a curl option from the list

Parameters

$name
public
# setCurlOptions( $options )

Set Curl Options. Overrides all curl options

Set Curl Options. Overrides all curl options

Parameters

$options
public
# setSSLCert( $certPath, null $passPhrase = null )

Set ssl parameters for certificate based client authentication

Set ssl parameters for certificate based client authentication

Parameters

$certPath
$passPhrase
public
# setHttpTimeout( integer $timeout )

Set connection timeout in seconds

Set connection timeout in seconds

Parameters

$timeout
public
# setHttpProxy( string $proxy )

Set HTTP proxy information

Set HTTP proxy information

Parameters

$proxy

Throws

PayPal\Exception\PayPalConfigurationException
public
# setHttpRetryCount( integer $retryCount )

Set Http Retry Counts

Set Http Retry Counts

Parameters

$retryCount
public integer
# getHttpRetryCount( )

Get Http Retry Counts

Get Http Retry Counts

Returns

integer
public
# setUserAgent( string $userAgentString )

Sets the User-Agent string on the HTTP request

Sets the User-Agent string on the HTTP request

Parameters

$userAgentString
public array
# getHttpConstantsFromConfigs( array $configs, $prefix )

Retrieves an array of constant key, and value based on Prefix

Retrieves an array of constant key, and value based on Prefix

Parameters

$configs
$prefix

Returns

array

Constants summary

string HEADER_SEPARATOR
# ';'
string HTTP_GET
# 'GET'
string HTTP_POST
# 'POST'

Properties summary

public static array $defaultCurlOptions

Some default options for curl These are typically overridden by PayPalConnectionManager

Some default options for curl These are typically overridden by PayPalConnectionManager

# array( CURLOPT_SSLVERSION => 6, CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 60, // maximum number of seconds to allow cURL functions to execute CURLOPT_USERAGENT => 'PayPal-PHP-SDK', CURLOPT_HTTPHEADER => array(), CURLOPT_SSL_VERIFYHOST => 2, CURLOPT_SSL_VERIFYPEER => 1, CURLOPT_SSL_CIPHER_LIST => 'TLSv1:TLSv1.2' //Allowing TLSv1 cipher list. //Adding it like this for backward compatibility with older versions of curl )
API documentation generated by ApiGen