mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 13:02:15 +09:00
Fixed coding style, removed warnings-as-errors setting.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10549 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
497f7f30bd
commit
b864c8fb92
2 changed files with 2779 additions and 1765 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/** @file
|
||||
vi: ts=4
|
||||
|
||||
Extends XE db classes to allow parsing methods to work in the absence of
|
||||
a real db connection for the db type.
|
||||
|
|
@ -7,75 +8,177 @@
|
|||
Included by XML Query/Schema Language validator
|
||||
*/
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
*/
|
||||
class DBMysqlConnectWrapper extends DBMysql
|
||||
{
|
||||
public $queries = '';
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->db_type = 'mysql';
|
||||
$this->_setDBInfo(); // Context::get() should indicate a mysql db
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return new DBMysqlConnectWrapper();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actDBClassStart()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $query
|
||||
*/
|
||||
public function actStart($query)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actFinish()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actDBClassFinish()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function isSupported()
|
||||
{
|
||||
// No need to actually check for 'mysql_connect' function
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function __connect($connection)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function _afterConnect($connection)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function _close($connection)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $type
|
||||
@param $indx
|
||||
*/
|
||||
public function close($type = 'master', $indx = NULL)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _begin()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _rollback()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _commit()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $query
|
||||
@param $connection
|
||||
*/
|
||||
public function __query($query, $connection)
|
||||
{
|
||||
$this->queries .= "\n" . $query;
|
||||
|
|
@ -83,11 +186,26 @@ class DBMysqlConnectWrapper extends DBMysql
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $result
|
||||
@param $arrayIndexEndValue
|
||||
*/
|
||||
public function _fetch($result, $arrayIndexEndValue = NULL)
|
||||
{
|
||||
return new any_prop_obj_base();
|
||||
return new Any_prop_obj_base();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $target_name
|
||||
*/
|
||||
public function isTableExists($target_name)
|
||||
{
|
||||
parent::isTableExists($target_name);
|
||||
|
|
@ -95,54 +213,121 @@ class DBMysqlConnectWrapper extends DBMysql
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function db_insert_id()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $result
|
||||
*/
|
||||
public function db_fetch_object(&$result)
|
||||
{
|
||||
return new any_prop_obj_base();
|
||||
return new Any_prop_obj_base();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
*/
|
||||
class DBMysqliConnectWrapper extends DBMysqli
|
||||
{
|
||||
public $queries = '';
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->db_type = 'mysqli';
|
||||
$this->_setDBInfo(); // Context::get() should indicate a mysqli db
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return new DBMysqlConnectWrapper();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actDBClassStart()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $query
|
||||
*/
|
||||
public function actStart($query)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actFinish()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actDBClassFinish()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function isSupported()
|
||||
{
|
||||
// No need to actually check for 'mysql_connect' function
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $target_name
|
||||
*/
|
||||
public function isTableExists($target_name)
|
||||
{
|
||||
parent::isTableExists($target_name);
|
||||
|
|
@ -152,48 +337,115 @@ class DBMysqliConnectWrapper extends DBMysqli
|
|||
|
||||
// use old mysql escape function, since the mysqli one uses
|
||||
// the connection resource (to get the current character set)
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $string
|
||||
*/
|
||||
public function addQuotes($string)
|
||||
{
|
||||
if(version_compare(PHP_VERSION, "5.9.0", "<") && get_magic_quotes_gpc())
|
||||
{
|
||||
$string = stripslashes(str_replace("\\", "\\\\", $string));
|
||||
}
|
||||
|
||||
if(!is_numeric($string))
|
||||
{
|
||||
$string = @mysql_real_escape_string($string);
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function __connect($connection)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function _afterConnect($connection)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function _close($connection)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $type
|
||||
@param $indx
|
||||
*/
|
||||
public function close($type = 'master', $indx = NULL)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _begin()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _rollback()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _commit()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $query
|
||||
@param $connection
|
||||
*/
|
||||
public function __query($query, $connection)
|
||||
{
|
||||
$this->queries .= "\n" . $query;
|
||||
|
|
@ -201,64 +453,145 @@ class DBMysqliConnectWrapper extends DBMysqli
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $result
|
||||
@param $arrayIndexEndValue
|
||||
*/
|
||||
public function _fetch($result, $arrayIndexEndValue = NULL)
|
||||
{
|
||||
return new any_prop_obj_base();
|
||||
return new Any_prop_obj_base();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function db_insert_id()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $result
|
||||
*/
|
||||
public function db_fetch_object(&$result)
|
||||
{
|
||||
return new any_prop_obj_base();
|
||||
return new Any_prop_obj_base();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
*/
|
||||
class DBCubridConnectWrapper extends DBCubrid
|
||||
{
|
||||
public $queries = '';
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->db_type = 'cubrid';
|
||||
$this->_setDBInfo(); // Context::get() should indicate a CUBRID db
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return new DBMysqlConnectWrapper();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actDBClassStart()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $query
|
||||
*/
|
||||
public function actStart($query)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _makeSequence()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actFinish()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actDBClassFinish()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function isSupported()
|
||||
{
|
||||
// No need to actually check for 'cubrid_connect' function
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $target_name
|
||||
*/
|
||||
public function isTableExists($target_name)
|
||||
{
|
||||
try
|
||||
|
|
@ -272,38 +605,93 @@ class DBCubridConnectWrapper extends DBCubrid
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function __connect($connection)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function _afterConnect($connection)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function _close($connection)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $type
|
||||
@param $indx
|
||||
*/
|
||||
public function close($type = 'master', $indx = NULL)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _begin()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _rollback()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _commit()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $query
|
||||
@param $connection
|
||||
*/
|
||||
public function __query($query, $connection)
|
||||
{
|
||||
$this->queries .= "\n" . $query;
|
||||
|
|
@ -311,59 +699,133 @@ class DBCubridConnectWrapper extends DBCubrid
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $result
|
||||
@param $arrayIndexEndValue
|
||||
*/
|
||||
public function _fetch($result, $arrayIndexEndValue = NULL)
|
||||
{
|
||||
return new any_prop_obj_base();
|
||||
return new Any_prop_obj_base();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function db_insert_id()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function &db_fetch_object()
|
||||
{
|
||||
return new any_prop_obj_base();
|
||||
return new Any_prop_obj_base();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
*/
|
||||
class DBMssqlConnectWrapper extends DBMssql
|
||||
{
|
||||
public $queries = '';
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->db_type = 'mssql';
|
||||
$this->_setDBInfo(); // Context::get() should indicate a MS Sql db
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return new DBMssqlConnectWrapper();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actDBClassStart()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $query
|
||||
*/
|
||||
public function actStart($query)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actFinish()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function actDBClassFinish()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function isSupported()
|
||||
{
|
||||
// No need to actually check for 'mssql_connect' function
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $target_name
|
||||
*/
|
||||
public function isTableExists($target_name)
|
||||
{
|
||||
parent::isTableExists($target_name);
|
||||
|
|
@ -371,62 +833,140 @@ class DBMssqlConnectWrapper extends DBMssql
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function __connect($connection)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function _afterConnect($connection)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $connection
|
||||
*/
|
||||
public function _close($connection)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $type
|
||||
@param $indx
|
||||
*/
|
||||
public function close($type = 'master', $indx = NULL)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _begin()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _rollback()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function _commit()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $query
|
||||
@param $connection
|
||||
*/
|
||||
public function __query($query, $connection)
|
||||
{
|
||||
if($this->queries)
|
||||
{
|
||||
$this->queries .= ";\n";
|
||||
}
|
||||
|
||||
$this->queries .= $query;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
@param $result
|
||||
@param $arrayIndexEndValue
|
||||
*/
|
||||
public function _fetch($result, $arrayIndexEndValue = NULL)
|
||||
{
|
||||
return new any_prop_obj_base();
|
||||
return new Any_prop_obj_base();
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function db_insert_id()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@brief
|
||||
@developer
|
||||
@return
|
||||
@access
|
||||
*/
|
||||
public function &db_fetch_object()
|
||||
{
|
||||
return new any_prop_obj_base();
|
||||
return new Any_prop_obj_base();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
/* End of file connect_wrapper.php */
|
||||
/* Location: tools/dbxml_validator/connect_wrapper.php */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue