ODE STYLE Formating gulliver/system/class.database_base.php
Change format files in gulliver/system/class.database_base.php
This commit is contained in:
@@ -1,155 +1,175 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* class.database_base.php
|
/**
|
||||||
* @package gulliver.system
|
* class.database_base.php
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* @package gulliver.system
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.
|
*
|
||||||
*
|
* ProcessMaker Open Source Edition
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* Copyright (C) 2004 - 2008 Colosa Inc.
|
||||||
* it under the terms of the GNU Affero General Public License as
|
*
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* License, or (at your option) any later version.
|
* it under the terms of the GNU Affero General Public License as
|
||||||
*
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
* This program is distributed in the hope that it will be useful,
|
* License, or (at your option) any later version.
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
*
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* This program is distributed in the hope that it will be useful,
|
||||||
* GNU Affero General Public License for more details.
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
*
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* GNU Affero General Public License for more details.
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
*
|
||||||
*
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
*
|
||||||
*
|
* 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
|
||||||
|
*
|
||||||
interface iDatabase {
|
* @package gulliver.system
|
||||||
public function generateDropTableSQL($sTable);
|
*/
|
||||||
public function generateCreateTableSQL($sTable, $aColumns);
|
|
||||||
public function generateDropColumnSQL($sTable, $sColumn);
|
interface iDatabase
|
||||||
public function generateAddColumnSQL($sTable, $sColumn, $aParameters);
|
{
|
||||||
public function generateChangeColumnSQL($sTable, $sColumn, $aParameters);
|
|
||||||
public function close();
|
public function generateDropTableSQL ($sTable);
|
||||||
}
|
|
||||||
|
public function generateCreateTableSQL ($sTable, $aColumns);
|
||||||
/**
|
|
||||||
* class database_base
|
public function generateDropColumnSQL ($sTable, $sColumn);
|
||||||
* @package gulliver.system
|
|
||||||
* @access public
|
public function generateAddColumnSQL ($sTable, $sColumn, $aParameters);
|
||||||
*/
|
|
||||||
class database_base implements iDatabase
|
public function generateChangeColumnSQL ($sTable, $sColumn, $aParameters);
|
||||||
{
|
|
||||||
protected $sType;
|
public function close ();
|
||||||
protected $sServer;
|
}
|
||||||
protected $sUser;
|
|
||||||
protected $sPass;
|
/**
|
||||||
protected $sDataBase;
|
* class database_base
|
||||||
protected $oConnection;
|
*
|
||||||
protected $sQuoteCharacter = '';
|
* @package gulliver.system
|
||||||
protected $sEndLine = ';';
|
* @access public
|
||||||
|
*/
|
||||||
/**
|
class database_base implements iDatabase
|
||||||
* Function __construct
|
{
|
||||||
* @access public
|
protected $sType;
|
||||||
* @param string $sType
|
protected $sServer;
|
||||||
* @param string $sServer
|
protected $sUser;
|
||||||
* @param string $sUser
|
protected $sPass;
|
||||||
* @param string $sPass
|
protected $sDataBase;
|
||||||
* @param string $sDataBase
|
protected $oConnection;
|
||||||
* @return void
|
protected $sQuoteCharacter = '';
|
||||||
*/
|
protected $sEndLine = ';';
|
||||||
|
|
||||||
public function __construct($sType = DB_ADAPTER, $sServer = DB_HOST, $sUser = DB_USER, $sPass = DB_PASS, $sDataBase = DB_NAME)
|
/**
|
||||||
{
|
* Function __construct
|
||||||
$this->sType = $sType;
|
*
|
||||||
$this->sServer = $sServer;
|
* @access public
|
||||||
$this->sUser = $sUser;
|
* @param string $sType
|
||||||
$this->sPass = $sPass;
|
* @param string $sServer
|
||||||
$this->sDataBase = $sDataBase;
|
* @param string $sUser
|
||||||
$this->oConnection = null;
|
* @param string $sPass
|
||||||
$this->sQuoteCharacter = '';
|
* @param string $sDataBase
|
||||||
}
|
* @return void
|
||||||
|
*/
|
||||||
/**
|
|
||||||
* Function generateDropTableSQL
|
public function __construct ($sType = DB_ADAPTER, $sServer = DB_HOST, $sUser = DB_USER, $sPass = DB_PASS, $sDataBase = DB_NAME)
|
||||||
* @access public
|
{
|
||||||
* @param string $sTable
|
$this->sType = $sType;
|
||||||
* @return string
|
$this->sServer = $sServer;
|
||||||
*/
|
$this->sUser = $sUser;
|
||||||
public function generateDropTableSQL($sTable)
|
$this->sPass = $sPass;
|
||||||
{
|
$this->sDataBase = $sDataBase;
|
||||||
$sSQL = 'DROP TABLE IF EXISTS ' . $this->sQuoteCharacter . $sTable . $this->sQuoteCharacter . $this->sEndLine;
|
$this->oConnection = null;
|
||||||
return $sSQL;
|
$this->sQuoteCharacter = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function generateDropTableSQL
|
* Function generateDropTableSQL
|
||||||
* @access public
|
*
|
||||||
* @param string $sTable
|
* @access public
|
||||||
* @param string $sColumn
|
* @param string $sTable
|
||||||
* @return void
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function generateCreateTableSQL($sTable, $aColumns)
|
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
|
* Function generateDropTableSQL
|
||||||
* @param string $sColumn
|
*
|
||||||
* @return void
|
* @access public
|
||||||
*/
|
* @param string $sTable
|
||||||
public function generateDropColumnSQL($sTable, $sColumn)
|
* @param string $sColumn
|
||||||
{
|
* @return void
|
||||||
}
|
*/
|
||||||
|
public function generateCreateTableSQL ($sTable, $aColumns)
|
||||||
/**
|
{
|
||||||
* Function generateDropTableSQL
|
}
|
||||||
* @access public
|
|
||||||
* @param string $sTable
|
/**
|
||||||
* @param string $sColumn
|
* Function generateDropTableSQL
|
||||||
* @param string $aParameters
|
*
|
||||||
* @return void
|
* @access public
|
||||||
*/
|
* @param string $sTable
|
||||||
public function generateAddColumnSQL($sTable, $sColumn, $aParameters)
|
* @param string $sColumn
|
||||||
{
|
* @return void
|
||||||
}
|
*/
|
||||||
|
public function generateDropColumnSQL ($sTable, $sColumn)
|
||||||
/**
|
{
|
||||||
* Function generateDropTableSQL
|
}
|
||||||
* @access public
|
|
||||||
* @param string $sTable
|
/**
|
||||||
* @param string $sColumn
|
* Function generateDropTableSQL
|
||||||
* @param string $aParameters
|
*
|
||||||
* @return void
|
* @access public
|
||||||
*/
|
* @param string $sTable
|
||||||
public function generateChangeColumnSQL($sTable, $sColumn, $aParameters)
|
* @param string $sColumn
|
||||||
{
|
* @param string $aParameters
|
||||||
}
|
* @return void
|
||||||
|
*/
|
||||||
/**
|
public function generateAddColumnSQL ($sTable, $sColumn, $aParameters)
|
||||||
* Function generateDropTableSQL
|
{
|
||||||
* @access public
|
}
|
||||||
* @param string $sQuery
|
|
||||||
* @return void
|
/**
|
||||||
*/
|
* Function generateDropTableSQL
|
||||||
public function executeQuery($sQuery)
|
*
|
||||||
{
|
* @access public
|
||||||
}
|
* @param string $sTable
|
||||||
|
* @param string $sColumn
|
||||||
/**
|
* @param string $aParameters
|
||||||
* Function close
|
* @return void
|
||||||
* @access public
|
*/
|
||||||
* @return void
|
public function generateChangeColumnSQL ($sTable, $sColumn, $aParameters)
|
||||||
*/
|
{
|
||||||
public function close()
|
}
|
||||||
{
|
|
||||||
}
|
/**
|
||||||
}
|
* Function generateDropTableSQL
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @param string $sQuery
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function executeQuery ($sQuery)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function close
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function close ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user