PortaBilling API Guzzle bindings

ConfigGuzzle extends Config
in package

Guzzle-specific config class

Setups wrapper for use Guzzle client and others components given

Table of Contents

__construct()  : mixed
Setup configuration object

Methods

__construct()

Setup configuration object

public __construct(string $host, CacheInterface $cache[, array<string|int, mixed>|null $account = null ][, array<string|int, mixed> $guzzleOptions = [] ]) : mixed
Parameters
$host : string

Hostname/IP address of the server, no slashes, no schema, but port if required. Example: bill-sip.mycompany.com

$cache : CacheInterface

SimpleCache object to persist session data

$account : array<string|int, mixed>|null = null

Account record to login to the billing. Combination of login+password or login+token required

$account = [
    'login' => 'myUserName',    // Mandatory username
    'password' => 'myPassword', // When login with password
    'token' => 'myToken'        // When login with API token
$guzzleOptions : array<string|int, mixed> = []

oprions, passed to Guzzle HTTP client.

Check Guzzle docs

Please, mind that Guzze options only apply at the moment of config class creation by it's __construct(), so if options set after the wrapper created - it will not be used.

Щешщт HTTP_ERRORS will be enforced to false for this lib works.

Tags
throws
PortaAuthException
Return values
mixed

Search results