\it\thecsea\mysqltcs\connectionsMysqlConnections

Class MysqlConnections this class manage the connections pool

Summary

Methods
Properties
Constants
getInstance()
getConnection()
removeClient()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__construct()
__clone()
findConnection()
$connections
$clients
$instance
N/A

Properties

$clients

$clients : array<mixed,\it\thecsea\mysqltcs\mysqltcs>

Type

array<mixed,\it\thecsea\mysqltcs\mysqltcs>

Methods

getConnection()

getConnection(\it\thecsea\mysqltcs\mysqltcs  $client, string  $host, string  $user, string  $password, string  $name, string  $key = "", string  $cert = "", string  $ca = "") : \it\thecsea\mysqltcs\connections\MysqlConnection

Get a connection; new or old, we don't know this

Parameters

\it\thecsea\mysqltcs\mysqltcs $client
string $host
string $user
string $password
string $name
string $key
string $cert
string $ca

Throws

\it\thecsea\mysqltcs\connections\MysqlConnectionException

Returns

\it\thecsea\mysqltcs\connections\MysqlConnection

removeClient()

removeClient(\it\thecsea\mysqltcs\mysqltcs  $client) 

Parameters

\it\thecsea\mysqltcs\mysqltcs $client

Throws

\it\thecsea\mysqltcs\connections\MysqlConnectionException

__construct()

__construct() 

Empty private construct (for singleton)

__clone()

__clone() 

Empty private clone (for singleton)

findConnection()

findConnection(string  $host, string  $user, string  $password, string  $name, string  $key = "", string  $cert = "", string  $ca = "") : \it\thecsea\mysqltcs\connections\MysqlConnection

Get a connection if it exists, otherwise it creates a new one

Parameters

string $host
string $user
string $password
string $name
string $key
string $cert
string $ca

Throws

\it\thecsea\mysqltcs\connections\utils\MysqlUtilsException

Returns

\it\thecsea\mysqltcs\connections\MysqlConnection