BexioCTX
in package
Base class containing cURL operations.
Table of Contents
Constants
- endpoint = 'https://api.bexio.com/'
Properties
Methods
- __construct() : mixed
- Create the context with API token needed to access endpoints
- __get() : mixed
- __isset() : bool
- __set() : void
- __unset() : void
- fetch() : stdClass|string
- Execute the request.
- reset() : void
- set_body() : void
- Set the request body if any.
- set_method() : mixed
- set_url() : mixed
Constants
endpoint
public
mixed
endpoint
= 'https://api.bexio.com/'
Properties
$c
protected
CurlHandle
$c
$headers
protected
array<string|int, mixed>
$headers
= []
$token
protected
string
$token
$values
protected
object
$values
Methods
__construct()
Create the context with API token needed to access endpoints
public
__construct(string $token) : mixed
Of all authentications available, only the API token is avaible.
Parameters
- $token : string
-
The token.
Tags
__get()
public
__get(string $name) : mixed
Parameters
- $name : string
__isset()
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
bool__set()
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
__unset()
public
__unset(string $name) : void
Parameters
- $name : string
fetch()
Execute the request.
public
fetch() : stdClass|string
Tags
Return values
stdClass|string —The JSON response decoded or the raw value
reset()
private
reset() : void
set_body()
Set the request body if any.
private
set_body([string $body = '' ]) : void
Parameters
- $body : string = ''
set_method()
private
set_method([string $method = 'get' ]) : mixed
Parameters
- $method : string = 'get'
set_url()
private
set_url(string $url) : mixed
Parameters
- $url : string