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,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class.database_base.php
|
* class.database_base.php
|
||||||
|
*
|
||||||
* @package gulliver.system
|
* @package gulliver.system
|
||||||
*
|
*
|
||||||
* ProcessMaker Open Source Edition
|
* ProcessMaker Open Source Edition
|
||||||
@@ -13,11 +15,11 @@
|
|||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU Affero General Public License for more details.
|
* GNU Affero General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||||
@@ -26,130 +28,148 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* interface iDatabase
|
* interface iDatabase
|
||||||
|
*
|
||||||
* @package gulliver.system
|
* @package gulliver.system
|
||||||
*/
|
*/
|
||||||
|
|
||||||
interface iDatabase {
|
interface iDatabase
|
||||||
public function generateDropTableSQL($sTable);
|
{
|
||||||
public function generateCreateTableSQL($sTable, $aColumns);
|
|
||||||
public function generateDropColumnSQL($sTable, $sColumn);
|
public function generateDropTableSQL ($sTable);
|
||||||
public function generateAddColumnSQL($sTable, $sColumn, $aParameters);
|
|
||||||
public function generateChangeColumnSQL($sTable, $sColumn, $aParameters);
|
public function generateCreateTableSQL ($sTable, $aColumns);
|
||||||
public function close();
|
|
||||||
|
public function generateDropColumnSQL ($sTable, $sColumn);
|
||||||
|
|
||||||
|
public function generateAddColumnSQL ($sTable, $sColumn, $aParameters);
|
||||||
|
|
||||||
|
public function generateChangeColumnSQL ($sTable, $sColumn, $aParameters);
|
||||||
|
|
||||||
|
public function close ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class database_base
|
* class database_base
|
||||||
|
*
|
||||||
* @package gulliver.system
|
* @package gulliver.system
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
class database_base implements iDatabase
|
class database_base implements iDatabase
|
||||||
{
|
{
|
||||||
protected $sType;
|
protected $sType;
|
||||||
protected $sServer;
|
protected $sServer;
|
||||||
protected $sUser;
|
protected $sUser;
|
||||||
protected $sPass;
|
protected $sPass;
|
||||||
protected $sDataBase;
|
protected $sDataBase;
|
||||||
protected $oConnection;
|
protected $oConnection;
|
||||||
protected $sQuoteCharacter = '';
|
protected $sQuoteCharacter = '';
|
||||||
protected $sEndLine = ';';
|
protected $sEndLine = ';';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function __construct
|
* Function __construct
|
||||||
* @access public
|
*
|
||||||
* @param string $sType
|
* @access public
|
||||||
* @param string $sServer
|
* @param string $sType
|
||||||
* @param string $sUser
|
* @param string $sServer
|
||||||
* @param string $sPass
|
* @param string $sUser
|
||||||
* @param string $sDataBase
|
* @param string $sPass
|
||||||
* @return void
|
* @param string $sDataBase
|
||||||
*/
|
* @return void
|
||||||
|
*/
|
||||||
|
|
||||||
public function __construct($sType = DB_ADAPTER, $sServer = DB_HOST, $sUser = DB_USER, $sPass = DB_PASS, $sDataBase = DB_NAME)
|
public function __construct ($sType = DB_ADAPTER, $sServer = DB_HOST, $sUser = DB_USER, $sPass = DB_PASS, $sDataBase = DB_NAME)
|
||||||
{
|
{
|
||||||
$this->sType = $sType;
|
$this->sType = $sType;
|
||||||
$this->sServer = $sServer;
|
$this->sServer = $sServer;
|
||||||
$this->sUser = $sUser;
|
$this->sUser = $sUser;
|
||||||
$this->sPass = $sPass;
|
$this->sPass = $sPass;
|
||||||
$this->sDataBase = $sDataBase;
|
$this->sDataBase = $sDataBase;
|
||||||
$this->oConnection = null;
|
$this->oConnection = null;
|
||||||
$this->sQuoteCharacter = '';
|
$this->sQuoteCharacter = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function generateDropTableSQL
|
* Function generateDropTableSQL
|
||||||
* @access public
|
*
|
||||||
* @param string $sTable
|
* @access public
|
||||||
* @return string
|
* @param string $sTable
|
||||||
*/
|
* @return string
|
||||||
public function generateDropTableSQL($sTable)
|
*/
|
||||||
{
|
public function generateDropTableSQL ($sTable)
|
||||||
$sSQL = 'DROP TABLE IF EXISTS ' . $this->sQuoteCharacter . $sTable . $this->sQuoteCharacter . $this->sEndLine;
|
{
|
||||||
return $sSQL;
|
$sSQL = 'DROP TABLE IF EXISTS ' . $this->sQuoteCharacter . $sTable . $this->sQuoteCharacter . $this->sEndLine;
|
||||||
}
|
return $sSQL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function generateDropTableSQL
|
* Function generateDropTableSQL
|
||||||
* @access public
|
*
|
||||||
* @param string $sTable
|
* @access public
|
||||||
* @param string $sColumn
|
* @param string $sTable
|
||||||
* @return void
|
* @param string $sColumn
|
||||||
*/
|
* @return void
|
||||||
public function generateCreateTableSQL($sTable, $aColumns)
|
*/
|
||||||
{
|
public function generateCreateTableSQL ($sTable, $aColumns)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function generateDropTableSQL
|
* Function generateDropTableSQL
|
||||||
* @access public
|
*
|
||||||
* @param string $sTable
|
* @access public
|
||||||
* @param string $sColumn
|
* @param string $sTable
|
||||||
* @return void
|
* @param string $sColumn
|
||||||
*/
|
* @return void
|
||||||
public function generateDropColumnSQL($sTable, $sColumn)
|
*/
|
||||||
{
|
public function generateDropColumnSQL ($sTable, $sColumn)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function generateDropTableSQL
|
* Function generateDropTableSQL
|
||||||
* @access public
|
*
|
||||||
* @param string $sTable
|
* @access public
|
||||||
* @param string $sColumn
|
* @param string $sTable
|
||||||
* @param string $aParameters
|
* @param string $sColumn
|
||||||
* @return void
|
* @param string $aParameters
|
||||||
*/
|
* @return void
|
||||||
public function generateAddColumnSQL($sTable, $sColumn, $aParameters)
|
*/
|
||||||
{
|
public function generateAddColumnSQL ($sTable, $sColumn, $aParameters)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function generateDropTableSQL
|
* Function generateDropTableSQL
|
||||||
* @access public
|
*
|
||||||
* @param string $sTable
|
* @access public
|
||||||
* @param string $sColumn
|
* @param string $sTable
|
||||||
* @param string $aParameters
|
* @param string $sColumn
|
||||||
* @return void
|
* @param string $aParameters
|
||||||
*/
|
* @return void
|
||||||
public function generateChangeColumnSQL($sTable, $sColumn, $aParameters)
|
*/
|
||||||
{
|
public function generateChangeColumnSQL ($sTable, $sColumn, $aParameters)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function generateDropTableSQL
|
* Function generateDropTableSQL
|
||||||
* @access public
|
*
|
||||||
* @param string $sQuery
|
* @access public
|
||||||
* @return void
|
* @param string $sQuery
|
||||||
*/
|
* @return void
|
||||||
public function executeQuery($sQuery)
|
*/
|
||||||
{
|
public function executeQuery ($sQuery)
|
||||||
}
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function close
|
* Function close
|
||||||
* @access public
|
*
|
||||||
* @return void
|
* @access public
|
||||||
*/
|
* @return void
|
||||||
public function close()
|
*/
|
||||||
{
|
public function close ()
|
||||||
}
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user