Tutorial Extension
1.0.0
SellerDeck Extensions - Tutorial Extension
|
Inherited by COrderBase, COrderDetailBase, COrderHistoryBase, COrderTrackingBase, CPaymentHistoryBase, CPersonBase, CProductBase, and CSetupBase.
Public Member Functions | |
__construct (\SDExtension\DB\CDataBase $oDB) | |
GetDB () | |
Reset () | |
Save ($aActualValues=null) | |
UpdateSave ($aActualValues=[], $bModified=true, $bAutoId=false) | |
Set ($aActualValues=[], $bModified=true) | |
Get () | |
GetRecords () | |
Load ($aWhere=[], $nReturnType=\PDO::FETCH_ASSOC) | |
LoadByValue ($sColumn, $sValue) | |
LoadByID ($sValue) | |
Reload ($sID=null) | |
CreateOriginalCopies () | |
Validate ($aActualValues=[]) | |
Protected Member Functions | |
GetRules () | |
Protected Attributes | |
$m_oDB = null | |
$m_sTable = 'table' | |
$m_sIdColumn = 'id' | |
$m_bAutoID = true | |
$m_aDefaultValues = [] | |
$m_aActualValues = [] | |
$m_aRules = [] | |
$m_bNewRecord | |
$m_bModified | |
Definition at line 14 of file CTable.php.
__construct | ( | \SDExtension\DB\CDataBase | $oDB | ) |
__construct - Object constructor method
public
CDataBase | $oDB | Database Object |
Definition at line 70 of file CTable.php.
CreateOriginalCopies | ( | ) |
CreateOriginalCopies - Creates Original Copies
public
Definition at line 294 of file CTable.php.
Get | ( | ) |
Get - Gets Active record values
public
Definition at line 177 of file CTable.php.
GetDB | ( | ) |
GetRecords | ( | ) |
GetRecords - Gets all records from the DB
public
Definition at line 188 of file CTable.php.
|
protected |
GetRules - Get Validator rules
protected
Definition at line 340 of file CTable.php.
Load | ( | $aWhere = [] , |
|
$nReturnType = \PDO::FETCH_ASSOC |
|||
) |
Load - Loads one record from the DB (the first record according to the condition)
public
array | $aWhere | Conditions |
int | $nReturnType | Return Type (associative array by default) |
Definition at line 204 of file CTable.php.
LoadByID | ( | $sValue | ) |
LoadByID - Loads one record by given ID value
public
string | $sValue | Column value |
Definition at line 241 of file CTable.php.
LoadByValue | ( | $sColumn, | |
$sValue | |||
) |
LoadByValue - Loads one record by condition: Column = Value
public
string | $sColumn | Column name |
string | $sValue | Column value |
Definition at line 228 of file CTable.php.
Reload | ( | $sID = null | ) |
Reload - Reloads Actual record, or loads a new one by given ID value
public
string | $sValue | Column value |
Definition at line 254 of file CTable.php.
Reset | ( | ) |
Save | ( | $aActualValues = null | ) |
Save - Saves (inserts or updates) actual record to DB
public
array | null | $aActualValues | Actual Values |
Definition at line 107 of file CTable.php.
Set | ( | $aActualValues = [] , |
|
$bModified = true |
|||
) |
Set - Sets Active record values
public
array | $aActualValues | Values to set |
bool | $bModified | Is modified? |
Definition at line 164 of file CTable.php.
UpdateSave | ( | $aActualValues = [] , |
|
$bModified = true , |
|||
$bAutoId = false |
|||
) |
UpdateSave - Updates record and saves it to the DB
public
array | $aActualValues | Values to set |
bool | $bModified | Is modified? |
bool | $bAutoId | Get id from Actual Record |
Definition at line 147 of file CTable.php.
Validate | ( | $aActualValues = [] | ) |
Validate - Validates record
public
array | $aActualValues | Column value |
Definition at line 320 of file CTable.php.