Exemplo n.º 1
0
 /**
  * @return bool
  */
 function Connect()
 {
     if (!USE_DB || $this->_dbConnection->IsConnected()) {
         return true;
     }
     if ($this->_dbConnection->Connect()) {
         @register_shutdown_function(array(&$this, 'Disconnect'));
         return true;
     } else {
         setGlobalError(defined('PROC_CANT_LOAD_DB') ? PROC_CANT_LOAD_DB : 'Can\'t connect to database.');
         return false;
     }
 }