PHP Class PayPal\Core\PPHttpConfig

Show file Open project: paypal/sdk-core-php Class Usage Examples

Public Properties

Property Type Description
$DEFAULT_CURL_OPTS Some default options for curl These are typically overridden by PPConnectionManager

Public Methods

Method Description
__construct ( string $url = null, string $method = self::HTTP_POST, array $configs = [] )
addCurlOption ( $name, $value )
addHeader ( $name, $value, $overWrite = true )
getCurlOptions ( )
getHeader ( $name )
getHeaders ( )
getHttpConstantsFromConfigs ( array $configs = [], $prefix ) : array Retrieves an array of constant key, and value based on Prefix
getHttpRetryCount ( )
getMethod ( )
getUrl ( )
removeCurlOption ( $name ) Removes a curl option from the list
removeHeader ( $name )
setCurlOptions ( $options )
setHeaders ( array $headers )
setHttpProxy ( string $proxy ) Set HTTP proxy information
setHttpRetryCount ( $retryCount )
setHttpTimeout ( integer $timeout ) Set connection timeout in seconds
setSSLCert ( string $certPath, $passPhrase = null ) Set ssl parameters for certificate based client authentication
setUrl ( $url )
setUserAgent ( string $userAgentString ) Sets the User-Agent string on the HTTP request

Method Details

__construct() public method

public __construct ( string $url = null, string $method = self::HTTP_POST, array $configs = [] )
$url string
$method string HTTP method (GET, POST etc) defaults to POST
$configs array All Configurations

addCurlOption() public method

public addCurlOption ( $name, $value )

addHeader() public method

public addHeader ( $name, $value, $overWrite = true )

getCurlOptions() public method

public getCurlOptions ( )

getHeader() public method

public getHeader ( $name )

getHeaders() public method

public getHeaders ( )

getHttpConstantsFromConfigs() public method

Retrieves an array of constant key, and value based on Prefix
public getHttpConstantsFromConfigs ( array $configs = [], $prefix ) : array
$configs array
$prefix
return array

getHttpRetryCount() public method

public getHttpRetryCount ( )

getMethod() public method

public getMethod ( )

getUrl() public method

public getUrl ( )

removeCurlOption() public method

Removes a curl option from the list
public removeCurlOption ( $name )
$name

removeHeader() public method

public removeHeader ( $name )

setCurlOptions() public method

public setCurlOptions ( $options )

setHeaders() public method

public setHeaders ( array $headers )
$headers array

setHttpProxy() public method

Set HTTP proxy information
public setHttpProxy ( string $proxy )
$proxy string

setHttpRetryCount() public method

public setHttpRetryCount ( $retryCount )

setHttpTimeout() public method

Set connection timeout in seconds
public setHttpTimeout ( integer $timeout )
$timeout integer

setSSLCert() public method

Set ssl parameters for certificate based client authentication
public setSSLCert ( string $certPath, $passPhrase = null )
$certPath string - path to client certificate file (PEM formatted file)

setUrl() public method

public setUrl ( $url )

setUserAgent() public method

Sets the User-Agent string on the HTTP request
public setUserAgent ( string $userAgentString )
$userAgentString string

Property Details

$DEFAULT_CURL_OPTS public static property

Some default options for curl These are typically overridden by PPConnectionManager
public static $DEFAULT_CURL_OPTS