Class ADOdbLoadBalancerConnection.
More...
|
string | $database = '' |
| Database connection database name.
|
|
string | $host = '' |
| Database connection host.
|
|
string | $password = '' |
| Database connection password.
|
|
bool | $persistent_connection = false |
| Determines if the connection persistent.
|
|
string | $type = 'write' |
| Type of connection, either 'write' capable or 'readonly'.
|
|
string | $user = '' |
| Database connection user.
|
|
int | $weight = 1 |
| Weight of connection, lower receives less queries, higher receives more queries.
|
|
|
bool | $adodb_obj = false |
| ADODB object.
|
|
callable | $connection_test_callback = NULL |
| Closure.
|
|
bool | $driver = false |
| ADOdb drive name.
|
|
◆ __construct()
ADOdbLoadBalancerConnection::__construct |
( |
| $driver, |
|
|
| $type = 'write', |
|
|
| $weight = 1, |
|
|
| $persistent_connection = false, |
|
|
| $argHostname = '', |
|
|
| $argUsername = '', |
|
|
| $argPassword = '', |
|
|
| $argDatabaseName = '' ) |
ADOdbLoadBalancerConnection constructor to setup the ADODB object.
- Parameters
-
| $driver | |
string | $type | |
int | $weight | |
bool | $persistent_connection | |
string | $argHostname | |
string | $argUsername | |
string | $argPassword | |
string | $argDatabaseName | |
◆ getADOdbObject()
ADOdbLoadBalancerConnection::getADOdbObject |
( |
| ) |
|
Returns the ADODB object for this connection.
- Return values
-
◆ getConnectionTestCallback()
ADOdbLoadBalancerConnection::getConnectionTestCallback |
( |
| ) |
|
◆ setConnectionTestCallback()
ADOdbLoadBalancerConnection::setConnectionTestCallback |
( |
| $callback | ) |
|
Anonymous function that is called and must return TRUE for the connection to be usable.
- The first argument is the type of connection to test. Useful to check things like replication lag.
- Parameters
-
- Return values
-
The documentation for this class was generated from the following file:
- lib/adodb/adodb-loadbalancer.inc.php