Documentation

CurlHelper
in package

Table of Contents

Properties

$curl_auth  : bool
$curl_token  : string
$curl_user  : string
$curlopt_array  : array<string|int, mixed>
$developer  : bool
$http_header  : array<string|int, mixed>
$url  : string

Methods

__construct()  : mixed
get()  : mixed
post()  : mixed
setAuth()  : mixed
setCurlOpt()  : mixed
setHttpHeader()  : mixed
checkErrors()  : mixed
formatHttpHeader()  : mixed
initCurl()  : mixed
runCURL()  : mixed

Properties

$curlopt_array

private array<string|int, mixed> $curlopt_array = []

$http_header

private array<string|int, mixed> $http_header = []

Methods

__construct()

public __construct(string $url) : mixed
Parameters
$url : string

get()

public get(string $endpoint[, array<string|int, mixed> $params = [] ][, mixed $timeout = 30 ]) : mixed
Parameters
$endpoint : string
$params : array<string|int, mixed> = []
$timeout : mixed = 30

post()

public post(string $endpoint[, array<string|int, mixed> $payload = [] ]) : mixed
Parameters
$endpoint : string
$payload : array<string|int, mixed> = []

setAuth()

public setAuth(string $user, string $token) : mixed
Parameters
$user : string
$token : string

setCurlOpt()

public setCurlOpt(array<string|int, mixed> $opts) : mixed
Parameters
$opts : array<string|int, mixed>

setHttpHeader()

public setHttpHeader(array<string|int, mixed> $header) : mixed
Parameters
$header : array<string|int, mixed>

checkErrors()

private checkErrors(mixed $data, mixed $ch) : mixed
Parameters
$data : mixed
$ch : mixed

formatHttpHeader()

private formatHttpHeader(mixed $header) : mixed
Parameters
$header : mixed

initCurl()

private initCurl([mixed $timeout = 30 ]) : mixed
Parameters
$timeout : mixed = 30

runCURL()

private runCURL(mixed $ch) : mixed
Parameters
$ch : mixed

        
On this page

Search results