Method |
Description |
|
__get ( string $name ) : mixed |
Returning variable from Object |
|
__isset ( string $name ) : boolean |
Check if the given field exists |
|
__set ( string $name, mixed $value ) |
Validating fields and setting variables to current operations |
|
addFields ( array $fields ) |
Add new fields to table, array schema like in create() function |
|
andWhere ( string $field, string $op, mixed $value ) : Core_Database |
Alias for where() |
|
asArray ( string $key = null, string $value = null ) : array |
Returning data as indexed or assoc array. |
|
config ( ) : object |
Returning object with config for table |
|
count ( ) : mixed |
Return count in integer or array of integers (if grouped) |
|
create ( string $name, array $fields ) |
Creating new table |
|
debug ( ) |
Debug functions, prints whole query with values |
|
delete ( ) : boolean |
Deleting loaded data |
|
deleteFields ( array $fields ) |
Delete fields from array |
|
fields ( ) : array |
Return array with names of fields |
|
find ( integer $id = NULL ) : Core_Database |
Returns one row with specified ID |
|
findAll ( ) |
Make data ready to read |
|
getIterator ( ) : ArrayIterator |
Iterator for Data |
|
groupBy ( string $column ) : Core_Database |
Grouping results by one field |
|
lastId ( ) : integer |
Returning last ID from table |
|
limit ( integer $number, integer $offset ) : Core_Database |
Limit returned data |
|
name ( ) : string |
Returns table name |
|
orWhere ( string $field, string $op, mixed $value ) : Core_Database |
Alias for where(), setting OR for searching |
|
orderBy ( string $key, string $direction = 'ASC' ) : Core_Database |
Sorting data by field |
|
relations ( string | null $tableName = null ) : array |
Returning assoc array with relationed tables |
|
remove ( string $name ) : boolean | Lazer\Classes\LazerException |
Removing table with config |
|
save ( ) |
Saving inserted or updated data |
|
schema ( ) : array |
Returning assoc array with types of fields |
|
table ( string $name ) : Lazer\Classes\Database |
Factory pattern |
|
where ( string $field, string $op, mixed $value ) : Core_Database |
Where function, like SQL |
|
with ( string $table ) : Core_Database |
JOIN other tables |
|