Свойство | Тип | Описание | |
---|---|---|---|
$auth_key | string | Holds the provided auth_key for API authentication | |
$curl_options | array | Holds the curl options | |
string | Holds the provided email address for API authentication |
Метод | Описание | |
---|---|---|
__construct ( ) | Make a new instance of the API client This can be done via providing the email address and api key as seperate parameters or by passing in an already instantiated object from which the details will be extracted | |
delete ( string $path, array $data = null ) : mixed | API call method for sending requests using DELETE | |
get ( string $path, array $data = null ) : mixed | API call method for sending requests using GET | |
patch ( string $path, array $data = null ) : mixed | API call method for sending requests using PATCH | |
post ( string $path, array $data = null ) : mixed | API call method for sending requests using POST | |
put ( string $path, array $data = null ) : mixed | API call method for sending requests using PUT | |
setAuthKey ( string $token ) | Setter to allow the setting of the Authentication Key | |
setCurlOption ( integer $key, mixed $value ) | Setter to allow the adding / changing of the Curl options that will be used within the HTTP requests | |
setEmail ( string $email ) | Setter to allow the setting of the email address |
Метод | Описание | |
---|---|---|
request ( string $path, array $data = null, string | null $method = null ) : mixed |
public __construct ( ) |
public setAuthKey ( string $token ) | ||
$token | string | Authentication key, this can be retrieve from the 'My Account' section of the Cloudflare account |
public setCurlOption ( integer $key, mixed $value ) | ||
$key | integer | The CURLOPT_XXX option to set e.g. CURLOPT_TIMEOUT |
$value | mixed | The value to be set on option e.g. 10 |
public string $auth_key | ||
Результат | string |
public string $email | ||
Результат | string |