diff --git a/gulliver/system/class.database_base.php b/gulliver/system/class.database_base.php index ab82ca68a..577fd1c34 100755 --- a/gulliver/system/class.database_base.php +++ b/gulliver/system/class.database_base.php @@ -1,155 +1,175 @@ -. - * - * For more information, contact Colosa Inc, 2566 Le Jeune Rd., - * Coral Gables, FL, 33134, USA, or email info@colosa.com. - * - */ - -/** - * interface iDatabase - * @package gulliver.system - */ - -interface iDatabase { - public function generateDropTableSQL($sTable); - public function generateCreateTableSQL($sTable, $aColumns); - public function generateDropColumnSQL($sTable, $sColumn); - public function generateAddColumnSQL($sTable, $sColumn, $aParameters); - public function generateChangeColumnSQL($sTable, $sColumn, $aParameters); - public function close(); -} - -/** - * class database_base - * @package gulliver.system - * @access public - */ -class database_base implements iDatabase -{ - protected $sType; - protected $sServer; - protected $sUser; - protected $sPass; - protected $sDataBase; - protected $oConnection; - protected $sQuoteCharacter = ''; - protected $sEndLine = ';'; - - /** - * Function __construct - * @access public - * @param string $sType - * @param string $sServer - * @param string $sUser - * @param string $sPass - * @param string $sDataBase - * @return void - */ - - public function __construct($sType = DB_ADAPTER, $sServer = DB_HOST, $sUser = DB_USER, $sPass = DB_PASS, $sDataBase = DB_NAME) - { - $this->sType = $sType; - $this->sServer = $sServer; - $this->sUser = $sUser; - $this->sPass = $sPass; - $this->sDataBase = $sDataBase; - $this->oConnection = null; - $this->sQuoteCharacter = ''; - } - - /** - * Function generateDropTableSQL - * @access public - * @param string $sTable - * @return string - */ - public function generateDropTableSQL($sTable) - { - $sSQL = 'DROP TABLE IF EXISTS ' . $this->sQuoteCharacter . $sTable . $this->sQuoteCharacter . $this->sEndLine; - return $sSQL; - } - - /** - * Function generateDropTableSQL - * @access public - * @param string $sTable - * @param string $sColumn - * @return void - */ - public function generateCreateTableSQL($sTable, $aColumns) - { - } - - /** - * Function generateDropTableSQL - * @access public - * @param string $sTable - * @param string $sColumn - * @return void - */ - public function generateDropColumnSQL($sTable, $sColumn) - { - } - - /** - * Function generateDropTableSQL - * @access public - * @param string $sTable - * @param string $sColumn - * @param string $aParameters - * @return void - */ - public function generateAddColumnSQL($sTable, $sColumn, $aParameters) - { - } - - /** - * Function generateDropTableSQL - * @access public - * @param string $sTable - * @param string $sColumn - * @param string $aParameters - * @return void - */ - public function generateChangeColumnSQL($sTable, $sColumn, $aParameters) - { - } - - /** - * Function generateDropTableSQL - * @access public - * @param string $sQuery - * @return void - */ - public function executeQuery($sQuery) - { - } - - /** - * Function close - * @access public - * @return void - */ - public function close() - { - } -} \ No newline at end of file +. + * + * For more information, contact Colosa Inc, 2566 Le Jeune Rd., + * Coral Gables, FL, 33134, USA, or email info@colosa.com. + * + */ + +/** + * interface iDatabase + * + * @package gulliver.system + */ + +interface iDatabase +{ + + public function generateDropTableSQL ($sTable); + + public function generateCreateTableSQL ($sTable, $aColumns); + + public function generateDropColumnSQL ($sTable, $sColumn); + + public function generateAddColumnSQL ($sTable, $sColumn, $aParameters); + + public function generateChangeColumnSQL ($sTable, $sColumn, $aParameters); + + public function close (); +} + +/** + * class database_base + * + * @package gulliver.system + * @access public + */ +class database_base implements iDatabase +{ + protected $sType; + protected $sServer; + protected $sUser; + protected $sPass; + protected $sDataBase; + protected $oConnection; + protected $sQuoteCharacter = ''; + protected $sEndLine = ';'; + + /** + * Function __construct + * + * @access public + * @param string $sType + * @param string $sServer + * @param string $sUser + * @param string $sPass + * @param string $sDataBase + * @return void + */ + + public function __construct ($sType = DB_ADAPTER, $sServer = DB_HOST, $sUser = DB_USER, $sPass = DB_PASS, $sDataBase = DB_NAME) + { + $this->sType = $sType; + $this->sServer = $sServer; + $this->sUser = $sUser; + $this->sPass = $sPass; + $this->sDataBase = $sDataBase; + $this->oConnection = null; + $this->sQuoteCharacter = ''; + } + + /** + * Function generateDropTableSQL + * + * @access public + * @param string $sTable + * @return string + */ + public function generateDropTableSQL ($sTable) + { + $sSQL = 'DROP TABLE IF EXISTS ' . $this->sQuoteCharacter . $sTable . $this->sQuoteCharacter . $this->sEndLine; + return $sSQL; + } + + /** + * Function generateDropTableSQL + * + * @access public + * @param string $sTable + * @param string $sColumn + * @return void + */ + public function generateCreateTableSQL ($sTable, $aColumns) + { + } + + /** + * Function generateDropTableSQL + * + * @access public + * @param string $sTable + * @param string $sColumn + * @return void + */ + public function generateDropColumnSQL ($sTable, $sColumn) + { + } + + /** + * Function generateDropTableSQL + * + * @access public + * @param string $sTable + * @param string $sColumn + * @param string $aParameters + * @return void + */ + public function generateAddColumnSQL ($sTable, $sColumn, $aParameters) + { + } + + /** + * Function generateDropTableSQL + * + * @access public + * @param string $sTable + * @param string $sColumn + * @param string $aParameters + * @return void + */ + public function generateChangeColumnSQL ($sTable, $sColumn, $aParameters) + { + } + + /** + * Function generateDropTableSQL + * + * @access public + * @param string $sQuery + * @return void + */ + public function executeQuery ($sQuery) + { + } + + /** + * Function close + * + * @access public + * @return void + */ + public function close () + { + } +} +