PHP Класс Stripe\HttpClient\CurlClient

Наследование: implements Stripe\HttpClient\ClientInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$defaultOptions

Открытые методы

Метод Описание
__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 )

Приватные методы

Метод Описание
caBundle ( )
handleCurlError ( $url, number $errno, string $message )

Описание методов

__construct() публичный Метод

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 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
Результат string A querystring, essentially.

getConnectTimeout() публичный Метод

public getConnectTimeout ( )

getDefaultOptions() публичный Метод

public getDefaultOptions ( )

getTimeout() публичный Метод

public getTimeout ( )

instance() публичный статический Метод

public static instance ( )

request() публичный Метод

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

setConnectTimeout() публичный Метод

public setConnectTimeout ( $seconds )

setTimeout() публичный Метод

public setTimeout ( $seconds )

Описание свойств

$defaultOptions защищенное свойство

protected $defaultOptions