ln/threecx

v0.0.9 2025-01-20 21:28 UTC

This package is auto-updated.

Last update: 2025-08-23 17:31:55 UTC


README

package to wrap the api of 3cx®

getting started

composer require ln/threecx

usage

conf

you need the FQDN of the instanz, username and password (with permissions for the action)

$client = new Client(new Host(string <fqdn>, int <port>, bool <debug, optional>));

$client->setUser(new User(string <username>, string <password>, string <mfa, optional>));
// or
$client->setRest(new Rest(string <clientId>, string <clientSecret>));
// or
$client->setToken(new Token(string <tokenType>, int <expires>, string <accessToken>, string <refreshToken>));

functions

get

$client->get(string <uri>, array <query>)

delete

$config->delete(string <uri>, array <query>)

post, put, patch

$config-><post|put|patch>(string <uri>, array <payload>, array <query>)