diff options
| author | Mike-Benoit <mikeb@timetrex.com> | 2022-01-05 10:44:44 -0800 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2022-01-08 12:01:39 +0100 |
| commit | 2a82884df7f254a7308a02d92a8c70c95c32d1ce (patch) | |
| tree | cf5a39fd6835d42de99a9a613dc8b0946b31564d /adodb-loadbalancer.inc.php | |
| parent | 649e5b442050b2eab5ac61cfec5499bbd30e3b17 (diff) | |
| download | adodb-2a82884df7f254a7308a02d92a8c70c95c32d1ce.tar.gz adodb-2a82884df7f254a7308a02d92a8c70c95c32d1ce.tar.bz2 adodb-2a82884df7f254a7308a02d92a8c70c95c32d1ce.zip | |
Rename _getConnection() to getConnectionById()
Following convention for public method. Since there was already a
getConnection() function, this probably makes more sense anyways.
Issue #784
Diffstat (limited to 'adodb-loadbalancer.inc.php')
| -rw-r--r-- | adodb-loadbalancer.inc.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/adodb-loadbalancer.inc.php b/adodb-loadbalancer.inc.php index 670ea2c3..797bfd4d 100644 --- a/adodb-loadbalancer.inc.php +++ b/adodb-loadbalancer.inc.php @@ -233,7 +233,7 @@ class ADOdbLoadBalancer * @return bool|ADOConnection * @throws Exception */ - public function _getConnection($connection_id) + public function getConnectionById( $connection_id) { if (isset($this->connections[$connection_id])) { $connection_obj = $this->connections[$connection_id]; @@ -305,7 +305,7 @@ class ADOdbLoadBalancer if ($connection_id !== false) { try { - $adodb_obj = $this->_getConnection($connection_id); + $adodb_obj = $this->getConnectionById($connection_id); if ( is_object( $adodb_obj ) ) { break; //Found valid connection, continue with it. } else { @@ -325,7 +325,7 @@ class ADOdbLoadBalancer } } - if ( !isset( $connection_id) ) { + if ( !isset($connection_id) ) { throw new Exception('No connection available to use at this time! Type: '. $type ); } @@ -446,7 +446,7 @@ class ADOdbLoadBalancer && $connection_obj->getADOdbObject()->_connectionID !== false ) ) { - $adodb_obj = $this->_getConnection($key); + $adodb_obj = $this->getConnectionById( $key); if (is_object($adodb_obj)) { $result_arr[] = $adodb_obj->Execute($sql, $inputarr); } |
