Documentation

BexioCTX
in package

Base class containing cURL operations.

Table of Contents

Constants

endpoint  = 'https://api.bexio.com/'

Properties

$c  : CurlHandle
$headers  : array<string|int, mixed>
$token  : string
$values  : object

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

$headers

protected array<string|int, mixed> $headers = []

$token

protected string $token

$values

protected object $values

Methods

__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
throws
Exception

A generic exception with code matching the HTTP error code from the upstream API if any.

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

        
On this page

Search results