PHP Class Stripe\HttpClient\CurlClient

Inheritance: implements Stripe\HttpClient\ClientInterface
Afficher le fichier Open project: stripe/stripe-php Class Usage Examples

Protected Properties

Свойство Type Description
$defaultOptions

Méthodes publiques

Méthode Description
__construct ( array | callable | null $defaultOptions = null ) CurlClient constructor.
encode ( array $arr, string | null $prefix = null ) : string
getConnectTimeout ( )
getDefaultOptions ( )
getTimeout ( )
instance ( )
request ( $method, $absUrl, $headers, $params, $hasFile ) END OF USER DEFINED TIMEOUTS
setConnectTimeout ( $seconds )
setTimeout ( $seconds )

Private Methods

Méthode Description
caBundle ( )
handleCurlError ( $url, number $errno, string $message )

Method Details

__construct() public méthode

Pass in a callable to $defaultOptions that returns an array of CURLOPT_* values to start off a request with, or an flat array with the same format used by curl_setopt_array() to provide a static set of options. Note that many options are overridden later in the request call, including timeouts, which can be set via setTimeout() and setConnectTimeout(). Note that request() will silently ignore a non-callable, non-array $defaultOptions, and will throw an exception if $defaultOptions returns a non-array value.
public __construct ( array | callable | null $defaultOptions = null )
$defaultOptions array | callable | null

encode() public static méthode

public static encode ( array $arr, string | null $prefix = null ) : string
$arr array An map of param keys to values.
$prefix string | null Only public for testability, should not be called outside of CurlClient
Résultat string A querystring, essentially.

getConnectTimeout() public méthode

public getConnectTimeout ( )

getDefaultOptions() public méthode

public getDefaultOptions ( )

getTimeout() public méthode

public getTimeout ( )

instance() public static méthode

public static instance ( )

request() public méthode

END OF USER DEFINED TIMEOUTS
public request ( $method, $absUrl, $headers, $params, $hasFile )

setConnectTimeout() public méthode

public setConnectTimeout ( $seconds )

setTimeout() public méthode

public setTimeout ( $seconds )

Property Details

$defaultOptions protected_oe property

protected $defaultOptions