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
$curl_auth
private
bool
$curl_auth
= false
$curl_token
private
string
$curl_token
= ""
$curl_user
private
string
$curl_user
= ""
$curlopt_array
private
array<string|int, mixed>
$curlopt_array
= []
$developer
private
bool
$developer
= false
private
array<string|int, mixed>
$http_header
= []
$url
private
string
$url
= ""
__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>
-
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
-
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
-