PHP Class PayPal\Core\PPHttpConfig

Afficher le fichier Open project: paypal/sdk-core-php Class Usage Examples

Méthodes publiques

Свойство Type Description
$DEFAULT_CURL_OPTS Some default options for curl These are typically overridden by PPConnectionManager

Méthodes publiques

Méthode 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 méthode

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 méthode

public addCurlOption ( $name, $value )

addHeader() public méthode

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

getCurlOptions() public méthode

public getCurlOptions ( )

getHeader() public méthode

public getHeader ( $name )

getHeaders() public méthode

public getHeaders ( )

getHttpConstantsFromConfigs() public méthode

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

getHttpRetryCount() public méthode

public getHttpRetryCount ( )

getMethod() public méthode

public getMethod ( )

getUrl() public méthode

public getUrl ( )

removeCurlOption() public méthode

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

removeHeader() public méthode

public removeHeader ( $name )

setCurlOptions() public méthode

public setCurlOptions ( $options )

setHeaders() public méthode

public setHeaders ( array $headers )
$headers array

setHttpProxy() public méthode

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

setHttpRetryCount() public méthode

public setHttpRetryCount ( $retryCount )

setHttpTimeout() public méthode

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

setSSLCert() public méthode

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 méthode

public setUrl ( $url )

setUserAgent() public méthode

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

Property Details

$DEFAULT_CURL_OPTS public_oe static_oe property

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