Combu Server
3.1.1
PHP API Documentation
|
Public Member Functions | |
Save () | |
Delete () | |
ToJson () | |
ToArray () | |
Static Public Member Functions | |
static | GetTableName ($class) |
static | LoadRecords ($query, $returnedClass="") |
static | CountRecords ($tableName, $filter=null) |
static | TruncateTable ($tableName) |
static | TruncateClass ($class) |
Protected Member Functions | |
_loadFilter ($tableName, $filter) | |
_loadByRow ($row, $stripSlashes=false, $callbackOnExists=false) | |
_Delete ($tableName, $filter=null) | |
Static Protected Member Functions | |
static | _count ($tableName, $filter=null) |
static | _load ($tableName, $returnedClass="", $where="", $order=null, $limit=null, $offset=null, &$count=null) |
static | _loadEx ($select, $from, $returnedClass="", $where="", $order=null, $limit=null, $offset=null, &$count=null, $debug=false) |
static | _loadQuery ($query, $returnedClass="") |
Standard base class for database table classes
Definition at line 8 of file DataClass.php.
|
staticprotected |
Returns the records count from a query
string | $filter | If specified it is specified as WHERE clause (do not include 'WHERE') |
Definition at line 52 of file DataClass.php.
|
protected |
Delete a record from the table with the specified filter Database $Database
string | $tableName | Table name |
string | $filter | Clause WHERE |
Definition at line 166 of file DataClass.php.
|
staticprotected |
Load the records from a table with specified WHERE, ORDER and LIMIT clauses
string | $tableName | |
string | $returnedClass | The class name to convert records, if empty then returns associative array |
string | $where | Clause WHERE |
string | $order | Clause ORDER BY |
int | $limit | Clause LIMIT count |
int | $offset | Clause LIMIT offset |
int | $count | If not NULL then this will be set to total COUNT (no LIMIT clause) |
Definition at line 80 of file DataClass.php.
|
protected |
Initialize the current object from an associative array
array | $row | Associative array to load |
Definition at line 42 of file DataClass.php.
|
staticprotected |
Definition at line 84 of file DataClass.php.
|
protected |
Load record data from a filter
string | $tableName | Name of the table |
string | $filter | Filter to apply |
Definition at line 26 of file DataClass.php.
|
staticprotected |
Definition at line 111 of file DataClass.php.
|
static |
Count the records from a table with specified filter
string | $tableName | Table name |
string | $filter | Clause WHERE |
Definition at line 139 of file DataClass.php.
Delete | ( | ) |
Delete the current object from database
Definition at line 155 of file DataClass.php.
|
static |
Definition at line 10 of file DataClass.php.
|
static |
Load the records from a query
string | $query | Statement SQL |
string | $returnedClass | Class name to convert the returned objects, if empty then returns associative arrays |
Definition at line 129 of file DataClass.php.
Save | ( | ) |
Save to database the current object
Definition at line 147 of file DataClass.php.
ToArray | ( | ) |
Definition at line 184 of file DataClass.php.
ToJson | ( | ) |
Returns this object in JSON format
Definition at line 180 of file DataClass.php.
|
static |
Delete all records associated to a class
Definition at line 200 of file DataClass.php.
|
static |
Delete all records from a table and resets the AUTOINCREMENT field $Database
Definition at line 192 of file DataClass.php.