mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 00:02:21 +09:00
Convert Object class to BaseObject in core classes
This commit is contained in:
parent
5bdf95932f
commit
1a81fd43f3
16 changed files with 129 additions and 120 deletions
|
|
@ -397,7 +397,7 @@ class DBMysql extends DB
|
|||
* Get information about a column
|
||||
* @param string $table_name table name
|
||||
* @param string $column_name column name
|
||||
* @return object
|
||||
* @return BaseObject
|
||||
*/
|
||||
function getColumnInfo($table_name, $column_name)
|
||||
{
|
||||
|
|
@ -708,14 +708,14 @@ class DBMysql extends DB
|
|||
|
||||
/**
|
||||
* Handles insertAct
|
||||
* @param Object $queryObject
|
||||
* @param BaseObject $queryObject
|
||||
* @param boolean $with_values
|
||||
* @return resource
|
||||
*/
|
||||
function _executeInsertAct($queryObject, $with_values = true)
|
||||
{
|
||||
$query = $this->getInsertSql($queryObject, $with_values, true);
|
||||
if(is_a($query, 'Object'))
|
||||
if($query instanceof BaseObject)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -724,14 +724,14 @@ class DBMysql extends DB
|
|||
|
||||
/**
|
||||
* Handles updateAct
|
||||
* @param Object $queryObject
|
||||
* @param BaseObject $queryObject
|
||||
* @param boolean $with_values
|
||||
* @return resource
|
||||
*/
|
||||
function _executeUpdateAct($queryObject, $with_values = true)
|
||||
{
|
||||
$query = $this->getUpdateSql($queryObject, $with_values, true);
|
||||
if(is_a($query, 'Object'))
|
||||
if($query instanceof BaseObject)
|
||||
{
|
||||
if(!$query->toBool()) return $query;
|
||||
else return;
|
||||
|
|
@ -741,14 +741,14 @@ class DBMysql extends DB
|
|||
|
||||
/**
|
||||
* Handles deleteAct
|
||||
* @param Object $queryObject
|
||||
* @param BaseObject $queryObject
|
||||
* @param boolean $with_values
|
||||
* @return resource
|
||||
*/
|
||||
function _executeDeleteAct($queryObject, $with_values = true)
|
||||
{
|
||||
$query = $this->getDeleteSql($queryObject, $with_values, true);
|
||||
if(is_a($query, 'Object'))
|
||||
if($query instanceof BaseObject)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -759,10 +759,10 @@ class DBMysql extends DB
|
|||
* Handle selectAct
|
||||
* In order to get a list of pages easily when selecting \n
|
||||
* it supports a method as navigation
|
||||
* @param Object $queryObject
|
||||
* @param BaseObject $queryObject
|
||||
* @param resource $connection
|
||||
* @param boolean $with_values
|
||||
* @return Object
|
||||
* @return BaseObject
|
||||
*/
|
||||
function _executeSelectAct($queryObject, $connection = null, $with_values = true)
|
||||
{
|
||||
|
|
@ -775,7 +775,7 @@ class DBMysql extends DB
|
|||
else
|
||||
{
|
||||
$query = $this->getSelectSql($queryObject, $with_values);
|
||||
if(is_a($query, 'Object'))
|
||||
if($query instanceof BaseObject)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -787,7 +787,7 @@ class DBMysql extends DB
|
|||
}
|
||||
|
||||
$data = $this->_fetch($result);
|
||||
$buff = new Object ();
|
||||
$buff = new BaseObject;
|
||||
$buff->data = $data;
|
||||
|
||||
if($queryObject->usesClickCount())
|
||||
|
|
@ -815,7 +815,7 @@ class DBMysql extends DB
|
|||
/**
|
||||
* Fetch a result row as an object
|
||||
* @param resource $result
|
||||
* @return object
|
||||
* @return BaseObject
|
||||
*/
|
||||
function db_fetch_object(&$result)
|
||||
{
|
||||
|
|
@ -845,15 +845,15 @@ class DBMysql extends DB
|
|||
|
||||
/**
|
||||
* If have a error, return error object
|
||||
* @param Object $queryObject
|
||||
* @return Object
|
||||
* @param BaseObject $queryObject
|
||||
* @return BaseObject
|
||||
*/
|
||||
function queryError($queryObject)
|
||||
{
|
||||
$limit = $queryObject->getLimit();
|
||||
if($limit && $limit->isPageHandler())
|
||||
{
|
||||
$buff = new Object ();
|
||||
$buff = new BaseObject;
|
||||
$buff->total_count = 0;
|
||||
$buff->total_page = 0;
|
||||
$buff->page = 1;
|
||||
|
|
@ -869,11 +869,11 @@ class DBMysql extends DB
|
|||
|
||||
/**
|
||||
* If select query execute, return page info
|
||||
* @param Object $queryObject
|
||||
* @param BaseObject $queryObject
|
||||
* @param resource $result
|
||||
* @param resource $connection
|
||||
* @param boolean $with_values
|
||||
* @return Object Object with page info containing
|
||||
* @return BaseObject Object with page info containing
|
||||
*/
|
||||
function queryPageLimit($queryObject, $result, $connection, $with_values = true)
|
||||
{
|
||||
|
|
@ -933,7 +933,7 @@ class DBMysql extends DB
|
|||
if($page > $total_page)
|
||||
{
|
||||
// If requested page is bigger than total number of pages, return empty list
|
||||
$buff = new Object ();
|
||||
$buff = new BaseObject;
|
||||
$buff->total_count = $total_count;
|
||||
$buff->total_page = $total_page;
|
||||
$buff->page = $page;
|
||||
|
|
@ -954,7 +954,7 @@ class DBMysql extends DB
|
|||
$virtual_no = $total_count - ($page - 1) * $list_count;
|
||||
$data = $this->_fetch($result, $virtual_no);
|
||||
|
||||
$buff = new Object ();
|
||||
$buff = new BaseObject;
|
||||
$buff->total_count = $total_count;
|
||||
$buff->total_page = $total_page;
|
||||
$buff->page = $page;
|
||||
|
|
@ -976,14 +976,14 @@ class DBMysql extends DB
|
|||
$select = $query->getSelectString($with_values);
|
||||
if($select == '')
|
||||
{
|
||||
return new Object(-1, "Invalid query");
|
||||
return new BaseObject(-1, "Invalid query");
|
||||
}
|
||||
$select = 'SELECT ' . $select;
|
||||
|
||||
$from = $query->getFromString($with_values);
|
||||
if($from == '')
|
||||
{
|
||||
return new Object(-1, "Invalid query");
|
||||
return new BaseObject(-1, "Invalid query");
|
||||
}
|
||||
$from = ' FROM ' . $from;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue