meraproject/vendor/yoomoney/yookassa-sdk-php/docs/classes/YooKassa-Client-CurlClient.md
keboss-m 5c21d25d45 Initial commit: Merakomis portal, Docker stack and user-reader API.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:04:05 +03:00

15 KiB

YooKassa API SDK

Class: \YooKassa\Client\CurlClient

Namespace: \YooKassa\Client


Summary:

Класс клиента Curl запросов


Constants

  • No constants found

Methods

Visibility Name Flag Summary
public __construct() CurlClient constructor.
public call() Создает CURL запрос, получает и возвращает обработанный ответ
public closeCurlConnection() Close connection
public getConfig() Возвращает настройки
public getConnectionTimeout() Возвращает значение параметра CURLOPT_CONNECTTIMEOUT
public getProxy() Возвращает настройки прокси
public getTimeout() Возвращает значение параметра CURLOPT_TIMEOUT
public getUserAgent() Возвращает UserAgent
public sendRequest() Выполняет запрос, получает и возвращает обработанный ответ
public setAdvancedCurlOptions() Устанавливает дополнительные настройки curl
public setBearerToken() Устанавливает OAuth-токен магазина
public setBody() Устанавливает тело запроса
public setConfig() Устанавливает настройки
public setConnectionTimeout() Устанавливает значение параметра CURLOPT_CONNECTTIMEOUT
public setCurlOption() Устанавливает параметры CURL
public setKeepAlive() Устанавливает флаг сохранения соединения
public setLogger() Устанавливает объект для логирования
public setProxy() Устанавливает настройки прокси
public setShopId() Устанавливает shopId магазина
public setShopPassword() Устанавливает секретный ключ магазина
public setTimeout() Устанавливает значение параметра CURLOPT_TIMEOUT

Details


Methods

public __construct() : mixed

public __construct() : mixed

Summary

CurlClient constructor.

Details:

Returns: mixed -

public call() : \YooKassa\Common\ResponseObject

public call(string $path, string $method, array $queryParams, string|null $httpBody = null, array $headers = array()) : \YooKassa\Common\ResponseObject

Summary

Создает CURL запрос, получает и возвращает обработанный ответ

Details:

Parameters:
Type Name Description
string path URL запроса
string method HTTP метод
array queryParams Массив GET параметров запроса
string OR null httpBody Тело запроса
array headers Массив заголовков запроса
Throws:
Type Description
\YooKassa\Common\Exceptions\ApiConnectionException
\YooKassa\Common\Exceptions\ApiException
\YooKassa\Common\Exceptions\AuthorizeException
\YooKassa\Common\Exceptions\ExtensionNotFoundException

Returns: \YooKassa\Common\ResponseObject -

Tags
Tag Version Description
inheritdoc

public closeCurlConnection() : mixed

public closeCurlConnection() : mixed

Summary

Close connection

Details:

Returns: mixed -

public getConfig() : mixed

public getConfig() : mixed

Summary

Возвращает настройки

Details:

Returns: mixed -

public getConnectionTimeout() : int

public getConnectionTimeout() : int

Summary

Возвращает значение параметра CURLOPT_CONNECTTIMEOUT

Details:

Returns: int -

public getProxy() : string

public getProxy() : string

Summary

Возвращает настройки прокси

Details:

Returns: string -

Tags
Tag Version Description
since 1.0.14

public getTimeout() : int

public getTimeout() : int

Summary

Возвращает значение параметра CURLOPT_TIMEOUT

Details:

Returns: int -

public getUserAgent() : \YooKassa\Client\UserAgent

public getUserAgent() : \YooKassa\Client\UserAgent

Summary

Возвращает UserAgent

Details:

Returns: \YooKassa\Client\UserAgent -

public sendRequest() : array

public sendRequest() : array

Summary

Выполняет запрос, получает и возвращает обработанный ответ

Details:

Throws:
Type Description
\YooKassa\Common\Exceptions\ApiConnectionException

Returns: array -

public setAdvancedCurlOptions() : void

public setAdvancedCurlOptions() : void

Summary

Устанавливает дополнительные настройки curl

Details:

Returns: void -

public setBearerToken() : $this

public setBearerToken(string $bearerToken) : $this

Summary

Устанавливает OAuth-токен магазина

Details:

Parameters:
Type Name Description
string bearerToken OAuth-токен магазина

Returns: $this -

public setBody() : mixed

public setBody(string $method, string $httpBody) : mixed

Summary

Устанавливает тело запроса

Details:

Parameters:
Type Name Description
string method HTTP метод
string httpBody Тело запроса

Returns: mixed -

public setConfig() : mixed

public setConfig(array $config) : mixed

Summary

Устанавливает настройки

Details:

Parameters:
Type Name Description
array config Настройки клиента

Returns: mixed -

public setConnectionTimeout() : mixed

public setConnectionTimeout(int $connectionTimeout) : mixed

Summary

Устанавливает значение параметра CURLOPT_CONNECTTIMEOUT

Details:

Parameters:
Type Name Description
int connectionTimeout Число секунд ожидания при попытке подключения

Returns: mixed -

public setCurlOption() : bool

public setCurlOption(string $optionName, mixed $optionValue) : bool

Summary

Устанавливает параметры CURL

Details:

Parameters:
Type Name Description
string optionName Имя параметра
mixed optionValue Значение параметра

Returns: bool -

public setKeepAlive() : $this

public setKeepAlive(bool $keepAlive) : $this

Summary

Устанавливает флаг сохранения соединения

Details:

Parameters:
Type Name Description
bool keepAlive Флаг сохранения настроек

Returns: $this -

public setLogger() : mixed

public setLogger(\Psr\Log\LoggerInterface|null $logger) : mixed

Summary

Устанавливает объект для логирования

Details:

Parameters:
Type Name Description
\Psr\Log\LoggerInterface OR null logger

Returns: mixed -

public setProxy() : mixed

public setProxy(string $proxy) : mixed

Summary

Устанавливает настройки прокси

Details:

Parameters:
Type Name Description
string proxy Прокси сервер

Returns: mixed -

Tags
Tag Version Description
since 1.0.14

public setShopId() : $this

public setShopId(mixed $shopId) : $this

Summary

Устанавливает shopId магазина

Details:

Parameters:
Type Name Description
mixed shopId shopId магазина

Returns: $this -

public setShopPassword() : $this

public setShopPassword(mixed $shopPassword) : $this

Summary

Устанавливает секретный ключ магазина

Details:

Parameters:
Type Name Description
mixed shopPassword Секретный ключ магазина

Returns: $this -

public setTimeout() : mixed

public setTimeout(int $timeout) : mixed

Summary

Устанавливает значение параметра CURLOPT_TIMEOUT

Details:

Parameters:
Type Name Description
int timeout Максимальное количество секунд для выполнения функций cURL

Returns: mixed -


Top Namespaces


Reports


This document was automatically generated from source code comments on 2023-04-06 using phpDocumentor

© 2023 YooMoney