mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
1st preview
This commit is contained in:
@@ -17,6 +17,8 @@ class DB_Model extends FHC_Model
|
||||
protected $hasSequence; // False if this table has a composite primary key that is not using a sequence
|
||||
// True if this table has a primary key that uses a sequence
|
||||
|
||||
protected $UDFs; //
|
||||
|
||||
function __construct($dbTable = null, $pk = null, $hasSequence = true)
|
||||
{
|
||||
parent::__construct();
|
||||
@@ -24,6 +26,7 @@ class DB_Model extends FHC_Model
|
||||
$this->pk = $pk;
|
||||
$this->hasSequence = $hasSequence;
|
||||
$this->load->database();
|
||||
$this->UDFs = array();
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
@@ -704,6 +707,27 @@ class DB_Model extends FHC_Model
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function getUDFs()
|
||||
{
|
||||
return $this->UDFs;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function getUDF($udf)
|
||||
{
|
||||
if (isset($this->UDFs[$udf]))
|
||||
{
|
||||
return $this->UDFs[$udf];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the caller is entitled to perform this operation with this right
|
||||
*/
|
||||
@@ -799,6 +823,7 @@ class DB_Model extends FHC_Model
|
||||
foreach($jsonValues as $key => $value)
|
||||
{
|
||||
$tmpResult->{$key} = $value;
|
||||
$this->UDFs[$key] = $value; //
|
||||
}
|
||||
}
|
||||
unset($tmpResult->{$toBeConverted->name});
|
||||
|
||||
Reference in New Issue
Block a user