Hello,

I need to use a second database for my app and the connection method should
be easyconnect which is not supported by Zend Framework. I created the
following class (sort of):

class My_Db_Adapter_Oracle extends Db_Adapter_Oracle {
    protected $_config = array(
        'dbname'       => null,
        'hostname'     => null,
        'username'     => null,
        'password'     => null,
    );

    protected function _connect() {
        $this->_connection = oci_connect($this->_config['username'],
$this->_config['password,
                                       '//' . $this->_config['hostname'] .
'/' . $this->_config['dbname']);
}

I saved this file as My_Oracle.php and placed it as and included file in the
controller which creates the connection, but when I call it, the original
Oracle adapter keeps being called.

I do not want to hack the code of my ZF's installation, I'd prefer extending
the class. How can I accomplish this in a elegant way?

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Overrinding-Zend_Db_Adapter_Oracle%3A%3A_connect%28%29-method-tp16698577p16698577.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to