\app\common\model\facadeConfig

Summary

Methods
Properties
Constants
lists()
get()
getError()
destroy()
update()
create()
delete()
save()
saveAll()
setDec()
setInc()
()
isForce()
()
exists()
isExists()
select()
find()
paginate()
No public properties found
No constants found
getFacadeClass()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

lists()

lists(mixed  $group) : array

static 获取配置信息

Parameters

mixed $group

Returns

array

get()

get(mixed  $data, mixed  $with = [], boolean  $cache = false, boolean  $failException = false) : static|null

static 查找单条记录

Parameters

mixed $data
mixed $with
boolean $cache
boolean $failException

Returns

static|null

getError()

getError() : mixed

static 获取错误信息

Returns

mixed

destroy()

destroy(mixed  $data) : boolean

static 软删除记录($data 主键列表 支持闭包查询条件)

Parameters

mixed $data

Returns

boolean

update()

update(array  $data = [], array  $where = [], array|true  $field = null) : static

static 更新数据

Parameters

array $data
array $where
array|true $field

Returns

static

create()

create(array  $data = [], array|true  $field = null, boolean  $replace = false) : static

static 写入数据

Parameters

array $data
array|true $field
boolean $replace

Returns

static

delete()

delete() : boolean

static 删除当前的记录

Returns

boolean

save()

save(array  $data = [], array  $where = [], string  $sequence = null) : boolean

static 保存当前数据对象

Parameters

array $data
array $where
string $sequence

Returns

boolean

saveAll()

saveAll(array  $dataSet, boolean  $replace = true) : \app\common\model\facade\Collection

static 保存多个数据到当前数据对象

Parameters

array $dataSet
boolean $replace

Returns

\app\common\model\facade\Collection

setDec()

setDec(string  $field, integer  $step = 1, integer  $lazyTime) : boolean

static 字段值(延迟)减少

Parameters

string $field
integer $step
integer $lazyTime

Returns

boolean

setInc()

setInc(string  $field, integer  $step = 1, integer  $lazyTime) : boolean

static 字段值(延迟)增长

Parameters

string $field
integer $step
integer $lazyTime

Returns

boolean

()

() : 

$this force(bool $force = true) static 更新是否强制写入数据 而不做比较

Returns

isForce()

isForce() : boolean

static 判断force

Returns

boolean

()

() : 

$this replace(bool $replace = true) static 新增数据是否使用Replace

Returns

exists()

exists(boolean  $exists) : void

static 设置数据是否存在

Parameters

boolean $exists

isExists()

isExists() : boolean

static 判断数据是否存在数据库

Returns

boolean

select()

select(array|string|\Query|\Closure  $data = null) : \app\common\model\facade\Collection|array|\PDOStatement|string

static 查找记录

Parameters

array|string|\Query|\Closure $data

Returns

\app\common\model\facade\Collection|array|\PDOStatement|string

find()

find(array|string|\Query|\Closure  $data = null) : array|null|\PDOStatement|string|\app\common\model\facade\Model

static 查找单条记录

Parameters

array|string|\Query|\Closure $data

Returns

array|null|\PDOStatement|string|\app\common\model\facade\Model

paginate()

paginate(integer|array  $listRows = null, integer|boolean  $simple = false, array  $config = []) : \think\Paginator

static 分页查询

Parameters

integer|array $listRows
integer|boolean $simple
array $config

Returns

\think\Paginator

getFacadeClass()

getFacadeClass() : string

获取当前Facade对应类名(或者已经绑定的容器对象标识)

Returns

string