/** * Connect to the database * * @return void * @throws Streamwide_Db_Adapter_Exception */ protected function _connect() { if ($this->_connection) { return; } if (!extension_loaded('pdo_oci')) { require_once 'Streamwide/Db/Adapter/Exception.php'; throw new Streamwide_Db_Adapter_Exception('pdo_oci extension is not installed'); } parent::_connect(); }
/** * Creates a PDO object and connects to the database. * * @return void * @throws Zend_Db_Adapter_Exception */ protected function _connect() { if ($this->_connection) { return; } parent::_connect(); if (isset($this->_config['options']['init_commands']) && is_array($this->_config['options']['init_commands'])) { foreach ($this->_config['options']['init_commands'] as $sqlInitCommand) { $this->_connection->exec($sqlInitCommand); } } }