PHP Class WPDKDBTableRow
## Overview
This class is a map of a single record on database. When a record is loaded the column are mapped as properties of
this class. For this reason exist the internal private property _excludeProperties. It is used to avoid get the
class properties.
### Property naming
To avoid property override, all protected, private or public property of this class **must** start with a
underscore prefix.
Mostra file
Open project: wpxtreme/wpdk
Public Properties
Property |
Type |
Description |
|
$table |
__WPDKDBTable |
An instance of table of record |
|
Public Methods
Method |
Description |
|
__construct ( __WPDKDBTable $dbtable, integer | array | object $pk = null ) : WPDKDBTableRow |
Create an instance of WPDKDBTableRow class |
|
defaults ( ) |
Override this method to return a filtered key pairs array with column name and default value |
|
desc ( ) : mixed |
Return the DESC table |
|
getInstance ( __WPDKDBTable $dbtable, integer | array | object $pk = null ) : WPDKDBTableRow |
Return an instance of WPDKDBTableRow class |
|
get_sql ( integer $pk, string $sql ) : string |
You can override this method to change the SQL used to retrive te single record information |
|
Private Methods
Method |
Description |
|
initByID ( integer $pk ) : boolean | array |
Return the array row and init this instance of WPDKDBTableRow from record ID. Return false if an error occour. |
|
Method Details
__construct()
public method
Create an instance of WPDKDBTableRow class
Override this method to return a filtered key pairs array with column name and default value
getInstance()
public static method
Return an instance of WPDKDBTableRow class
public static getInstance ( __WPDKDBTable $dbtable, integer | array | object $pk = null ) : WPDKDBTableRow |
$dbtable |
__WPDKDBTable |
An instance of __WPDKDBTable class |
$pk |
integer | array | object |
Optional. Any id, array or object |
return |
WPDKDBTableRow |
|
You can override this method to change the SQL used to retrive te single record information
Property Details
$table public_oe property
An instance of table of record
public __WPDKDBTable $table |
return |
__WPDKDBTable |
|