PHP 클래스 PayPal\Core\PayPalHttpConfig

파일 보기 프로젝트 열기: paypal/rest-api-sdk-php 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$defaultCurlOptions array Some default options for curl These are typically overridden by PayPalConnectionManager

공개 메소드들

메소드 설명
__construct ( string $url = null, string $method = self::HTTP_POST, array $configs = [] ) Default Constructor
addCurlOption ( string $name, mixed $value ) Add Curl Option
addHeader ( $name, $value, boolean $overWrite = true ) Adds a Header
getCurlOptions ( ) : array Gets all curl options
getHeader ( $name ) : string | null Get Header by Name
getHeaders ( ) : array Gets all Headers
getHttpConstantsFromConfigs ( array $configs = [], $prefix ) : array Retrieves an array of constant key, and value based on Prefix
getHttpRetryCount ( ) : integer Get Http Retry Counts
getMethod ( ) : string Gets Method
getUrl ( ) : null | string Gets Url
removeCurlOption ( $name ) Removes a curl option from the list
removeHeader ( $name ) Removes a Header
setCurlOptions ( $options ) Set Curl Options. Overrides all curl options
setHeaders ( array $headers = [] ) Set Headers
setHttpProxy ( string $proxy ) Set HTTP proxy information
setHttpRetryCount ( integer $retryCount ) Set Http Retry Counts
setHttpTimeout ( integer $timeout ) Set connection timeout in seconds
setSSLCert ( $certPath, null $passPhrase = null ) Set ssl parameters for certificate based client authentication
setUrl ( $url ) Sets Url
setUserAgent ( string $userAgentString ) Sets the User-Agent string on the HTTP request

메소드 상세

__construct() 공개 메소드

Default Constructor
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() 공개 메소드

Add Curl Option
public addCurlOption ( string $name, mixed $value )
$name string
$value mixed

addHeader() 공개 메소드

Adds a Header
public addHeader ( $name, $value, boolean $overWrite = true )
$name
$value
$overWrite boolean allows you to override header value

getCurlOptions() 공개 메소드

Gets all curl options
public getCurlOptions ( ) : array
리턴 array

getHeader() 공개 메소드

Get Header by Name
public getHeader ( $name ) : string | null
$name
리턴 string | null

getHeaders() 공개 메소드

Gets all Headers
public getHeaders ( ) : array
리턴 array

getHttpConstantsFromConfigs() 공개 메소드

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

getHttpRetryCount() 공개 메소드

Get Http Retry Counts
public getHttpRetryCount ( ) : integer
리턴 integer

getMethod() 공개 메소드

Gets Method
public getMethod ( ) : string
리턴 string

getUrl() 공개 메소드

Gets Url
public getUrl ( ) : null | string
리턴 null | string

removeCurlOption() 공개 메소드

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

removeHeader() 공개 메소드

Removes a Header
public removeHeader ( $name )
$name

setCurlOptions() 공개 메소드

Set Curl Options. Overrides all curl options
public setCurlOptions ( $options )
$options

setHeaders() 공개 메소드

Set Headers
public setHeaders ( array $headers = [] )
$headers array

setHttpProxy() 공개 메소드

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

setHttpRetryCount() 공개 메소드

Set Http Retry Counts
public setHttpRetryCount ( integer $retryCount )
$retryCount integer

setHttpTimeout() 공개 메소드

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

setSSLCert() 공개 메소드

Set ssl parameters for certificate based client authentication
public setSSLCert ( $certPath, null $passPhrase = null )
$certPath
$passPhrase null

setUrl() 공개 메소드

Sets Url
public setUrl ( $url )
$url

setUserAgent() 공개 메소드

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

프로퍼티 상세

$defaultCurlOptions 공개적으로 정적으로 프로퍼티

Some default options for curl These are typically overridden by PayPalConnectionManager
public static array $defaultCurlOptions
리턴 array