Example #1
0
 /**
  * Tries to get a reference to a PDO object from the database manager
  * @uses Database
  * @throws Exception
  */
 protected function _getPDO()
 {
     // Get a reference to a database connection, to be used later
     $this->_pdo = Database::getMysqlConncetion($this->_host, $this->_username, $this->_password, $this->_schema);
     // If we didn't get a connection something is wrong
     if (!$this->_pdo) {
         throw new Exception('PDO connection could not be established', Exception::MESSAGE_DATABASE);
     }
     // We don't need this data anymore, delete it so it never gets dumped to screens.
     $this->_host = $this->_username = $this->_password = '';
 }