Documentation

BexioAPI
in package

Base class for enpdoints.

Table of Contents

Properties

$ctx  : BexioCTX
$endpoint  : string
$ownerid  : int|null
$userid  : int|null

Methods

__construct()  : mixed
Create withing the given context.
getType()  : string
Get the current type.
setCurrentOwner()  : void
Set current owner id.
setCurrentUser()  : void
Set current user id.

Properties

$endpoint

protected string $endpoint

$ownerid

protected int|null $ownerid = null

$userid

protected int|null $userid = null

Methods

__construct()

Create withing the given context.

public __construct(BexioCTX $ctx) : mixed
Parameters
$ctx : BexioCTX

The context in which the API will work.

getType()

Get the current type.

public getType() : string

The current type correspond to an endpoint in the upstream API.

Return values
string

The type name

setCurrentOwner()

Set current owner id.

public setCurrentOwner(int $ownerid) : void

Some items, at creation, need a user id and/or an owner id. This set the owner.

Parameters
$ownerid : int

The id of the owner for all creation from now on.

setCurrentUser()

Set current user id.

public setCurrentUser(int $userid) : void

Some items, at creation, need a user id and/or an owner id. Setting this here allows to automatically add this to the item. If only user is set, when owner is needed it would be set to user.

Parameters
$userid : int

The id of the user for all creation from now on.


        
On this page

Search results