\app\framework\Component\Database\ModelModel

Summary

Methods
Properties
Constants
__construct()
save()
count()
get()
fillData()
No public properties found
CREATED_AT
UPDATED_AT
No protected methods found
$connection
$table
$primaryKey
$keyType
N/A
No private methods found
No private properties found
N/A

Constants

CREATED_AT

CREATED_AT

The name of the "created at" column.

UPDATED_AT

UPDATED_AT

The name of the "updated at" column.

Properties

$connection

$connection : 

The connection name for the model.

Type

$table

$table : string

The table associated with the model.

Type

string

$primaryKey

$primaryKey : string

The primary key for the model.

Type

string

$keyType

$keyType : string

The "type" of the auto-incrementing ID.

Type

string

Methods

save()

save() 

to save the this model to the database

count()

count() 

Get number of entries in table

get()

get() 

selects entries of table and return array of Models filled with data.

fillData()

fillData(array  $data) 

Parameters

array $data