ApiClient
in package
YetiForce register class.
Table of Contents
- URL = 'https://api.yetiforce.eu/registrations'
- $error : string|null
- $connectTimeout : int
- $responseBody : string
- $responseCode : int|null
- $success : bool
- $timeout : int
- getError() : string
- Get last error.
- getRequestOptions() : array<string|int, mixed>
- Get request options.
- getResponseBody() : mixed
- Get response content.
- getStatusCode() : int
- Get response status code.
- send() : bool
- Send registration data.
- basicValidations() : void
- Basic validations.
- isWritable() : bool
- Check write permissions for the registry file.
Constants
URL
public
string
URL
= 'https://api.yetiforce.eu/registrations'
URL
Properties
$error
public
string|null
$error
= null
Last error.
$connectTimeout
private
int
$connectTimeout
= 10
The number of seconds to wait while trying to connect to a server.
$responseBody
private
string
$responseBody
Resopnse body
$responseCode
private
int|null
$responseCode
= 0
Resopnse code
$success
private
bool
$success
Response result
$timeout
private
int
$timeout
= 20
Total timeout of the request in seconds.
Methods
getError()
Get last error.
public
getError() : string
Return values
string —getRequestOptions()
Get request options.
public
getRequestOptions() : array<string|int, mixed>
Return values
array<string|int, mixed> —getResponseBody()
Get response content.
public
getResponseBody() : mixed
Return values
mixed —getStatusCode()
Get response status code.
public
getStatusCode() : int
Return values
int —send()
Send registration data.
public
send(string $url, string $method[, array<string|int, mixed> $option = [] ]) : bool
Parameters
- $url : string
- $method : string
- $option : array<string|int, mixed> = []
Return values
bool —basicValidations()
Basic validations.
private
basicValidations(string $url) : void
Parameters
- $url : string
Return values
void —isWritable()
Check write permissions for the registry file.
private
isWritable() : bool