/** * Closes the specified connection * * @param Doctrine_Connection $connection * @return void */ public function closeConnection(Doctrine_Connection $connection) { $connection->close(); $key = array_search($connection, $this->_connections, true); if ($key !== false) { unset($this->_connections[$key]); } $this->_currIndex = key($this->_connections); unset($connection); }