Constants

ONE_TO_ONE

ONE_TO_ONE = 'ONE_TO_ONE'

ONE_TO_MANY

ONE_TO_MANY = 'ONE_TO_MANY'

BELONGS_TO

BELONGS_TO = 'BELONGS_TO'

MANY_TO_MANY

MANY_TO_MANY = 'MANY_TO_MANY'

Properties

$tableName

$tableName : 

Type

$primaryKey

$primaryKey : 

Type

$field

$field : 

Type

$rule

$rule : 

Type

$default

$default : 

Type

$cast

$cast : 

Type

$query

$query : 

Type

$attribute

$attribute : 

Type

$relationDefine

$relationDefine : 

Type

Methods

__construct()

__construct() 

searchWithPage()

searchWithPage(  $pageindex,   $pagesize) 

Parameters

$pageindex
$pagesize

getLastQueryTotal()

getLastQueryTotal() 

count()

count() 

fill()

fill(  $field,   $value = '') 

Parameters

$field
$value

get()

get() 

getall()

getall(  $keyfield = '') 

Parameters

$keyfield

getQuery()

getQuery() 

getTableName()

getTableName() 

with()

with(  $relation) 

Parameters

$relation

getById()

getById(  $id) 

Parameters

$id

getcolumn()

getcolumn(  $field = '') 

Parameters

$field

where()

where(  $condition,   $parameters = array(),   $operator = 'AND') 

Parameters

$condition
$parameters
$operator

whereor()

whereor(  $condition,   $parameters = array()) 

Parameters

$condition
$parameters

orderby()

orderby(  $field,   $direction = 'ASC') 

Parameters

$field
$direction

save()

save() 

delete()

delete() 

__call()

__call(  $method,   $params) 

Parameters

$method
$params

accountMemberFields()

accountMemberFields(  $uniacid,   $is_available,   $select = array()) 

Parameters

$uniacid
$is_available
$select

emailExist()

emailExist(  $uid,   $email) 

Parameters

$uid
$email

mobileExist()

mobileExist(  $uid,   $mobile) 

Parameters

$uid
$mobile

updateMember()

updateMember(  $uid,   $fields = array()) 

Parameters

$uid
$fields

creditsRecordList()

creditsRecordList() 

searchCreditsRecordUid()

searchCreditsRecordUid(  $uid) 

Parameters

$uid

searchCreditsRecordType()

searchCreditsRecordType(  $type) 

Parameters

$type

searchWithMember()

searchWithMember() 

searchWithMemberEmail()

searchWithMemberEmail(  $email) 

Parameters

$email

searchWithMobile()

searchWithMobile(  $mobile) 

Parameters

$mobile

searchWithRandom()

searchWithRandom(  $info) 

Parameters

$info

mcFieldsList()

mcFieldsList(  $uniacid) 

Parameters

$uniacid

valid()

valid(  $data) 

Parameters

$data

hasOne()

hasOne(  $table,   $foreign_key,   $owner_key = false) 

Parameters

$table
$foreign_key
$owner_key

hasMany()

hasMany(  $table,   $foreign_key,   $owner_key = false) 

Parameters

$table
$foreign_key
$owner_key

belongsTo()

belongsTo(  $table,   $foreign_key,   $owner_key = false) 

Parameters

$table
$foreign_key
$owner_key

belongsMany()

belongsMany(  $table,   $foreign_key,   $owner_key,   $center_table,   $center_foreign_key = false,   $center_owner_key = false) 

Parameters

$table
$foreign_key
$owner_key
$center_table
$center_foreign_key
$center_owner_key

fillField()

fillField(  $column,   $val) 

Parameters

$column
$val

getColumnVal()

getColumnVal(  $column,   $val) 

Parameters

$column
$val

cast()

cast(  $column,   $val) 

Parameters

$column
$val

appendDefault()

appendDefault() 

loadRelation()

loadRelation(array  $data,   $muti = false) 

Parameters

array $data
$muti

doload()

doload(  $relation,   $data,   $muti = false, callable  $closure = null) 

Parameters

$relation
$data
$muti
callable $closure

doManyToMany()

doManyToMany(  $relation,   $relation_param,   $data,   $muti = false) 

Parameters

$relation
$relation_param
$data
$muti

isGetSingle()

isGetSingle(  $type) 

Parameters

$type

getForeignVal()

getForeignVal(  $data,   $owner_key,   $muti = false) 

Parameters

$data
$owner_key
$muti

getSecondTableData()

getSecondTableData(  $table,   $foreign_key,   $foreign_vals,   $single = false,   $closure = null) 

Parameters

$table
$foreign_key
$foreign_vals
$single
$closure

groupBy()

groupBy(  $key,   $array) 

Parameters

$key
$array

relationArray()

relationArray(  $type,   $table,   $foreign_key,   $owner_key) 

Parameters

$type
$table
$foreign_key
$owner_key

doWhere()

doWhere(  $field,   $params,   $operator = 'AND') 

Parameters

$field
$params
$operator

snake()

snake(  $value) 

Parameters

$value

studly()

studly(  $value) 

Parameters

$value