thinkphp8 vscode代码提示

think\facade\Session

  • @method static void setData(array $data) 设置数据
  • @method static void init() session初始化
  • @method static void setName(string $name) 设置SessionName
  • @method static string getName() 获取sessionName
  • @method static void setId(string $id = null) session_id设置
  • @method static string getId() 获取session_id
  • @method static array all() 获取所有数据
  • @method static void set(string $name, $value) session设置
  • @method static mixed get(string $name, $default = null) session获取
  • @method static mixed pull(string $name) session获取并删除
  • @method static void push(string $key, $value) 添加数据到一个session数组
  • @method static bool has(string $name) 判断session数据
  • @method static void delete(string $name) 删除session数据
  • @method static void clear() 清空session数据
  • @method static void destroy() 销毁session
  • @method static void regenerate(bool $destroy = false) 重新生成session id
  • @method static void save() 保存session数据
  • @method static void flash(string $name, $value) session设置 下一次请求有效
  • @method static void reflash() 将本次闪存数据推迟到下次请求
  • @method static void clearFlashData() 清空当前请求的session数据
  • @method static string serialize(mixed $data) 序列化数据
  • @method static array unserialize(string $data) 反序列化数据

think\DbManager

  • @method static \think\db\Query master() static 从主服务器读取数据
  • @method static \think\db\Query readMaster(bool $all = false) static 后续从主服务器读取数据
  • @method static \think\db\Query table(string $table) static 指定数据表(含前缀)
  • @method static \think\db\Query name(string $name) static 指定数据表(不含前缀)
  • @method static \think\db\Expression raw(string $value) static 使用表达式设置数据
  • @method static \think\db\Query where(mixed $field, string $op = null, mixed $condition = null) static 查询条件
  • @method static \think\db\Query whereRaw(string $where, array $bind = []) static 表达式查询
  • @method static \think\db\Query whereExp(string $field, string $condition, array $bind = []) static 字段表达式查询
  • @method static \think\db\Query when(mixed $condition, mixed $query, mixed $otherwise = null) static 条件查询
  • @method static \think\db\Query join(mixed $join, mixed $condition = null, string $type = ‘INNER’) static JOIN查询
  • @method static \think\db\Query view(mixed $join, mixed $field = null, mixed $on = null, string $type = ‘INNER’) static 视图查询
  • @method static \think\db\Query field(mixed $field, boolean $except = false) static 指定查询字段
  • @method static \think\db\Query fieldRaw(string $field, array $bind = []) static 指定查询字段
  • @method static \think\db\Query union(mixed $union, boolean $all = false) static UNION查询
  • @method static \think\db\Query limit(mixed $offset, integer $length = null) static 查询LIMIT
  • @method static \think\db\Query order(mixed $field, string $order = null) static 查询ORDER
  • @method static \think\db\Query orderRaw(string $field, array $bind = []) static 查询ORDER
  • @method static \think\db\Query cache(mixed $key = null , integer $expire = null) static 设置查询缓存
  • @method static \think\db\Query withAttr(string $name,callable $callback = null) static 使用获取器获取数据
  • @method static mixed value(string $field) static 获取某个字段的值
  • @method static array column(string $field, string $key = ‘’) static 获取某个列的值
  • @method static mixed find(mixed $data = null) static 查询单个记录
  • @method static mixed select(mixed $data = null) static 查询多个记录
  • @method static integer insert(array $data, boolean $replace = false, boolean $getLastInsID = false, string $sequence = null) static 插入一条记录
  • @method static integer insertGetId(array $data, boolean $replace = false, string $sequence = null) static 插入一条记录并返回自增ID
  • @method static integer insertAll(array $dataSet) static 插入多条记录
  • @method static integer update(array $data) static 更新记录
  • @method static integer delete(mixed $data = null) static 删除记录
  • @method static boolean chunk(integer $count, callable $callback, string $column = null) static 分块获取数据
  • @method static \Generator cursor(mixed $data = null) static 使用游标查找记录
  • @method static mixed query(string $sql, array $bind = [], boolean $master = false, bool $pdo = false) static SQL查询
  • @method static integer execute(string $sql, array $bind = [], boolean $fetch = false, boolean $getLastInsID = false, string $sequence = null) static SQL执行
  • @method static \think\Paginator paginate(integer $listRows = 15, mixed $simple = null, array $config = []) static 分页查询
  • @method static mixed transaction(callable $callback) static 执行数据库事务
  • @method static void startTrans() static 启动事务
  • @method static void commit() static 用于非自动提交状态下面的查询提交
  • @method static void rollback() static 事务回滚
  • @method static boolean batchQuery(array $sqlArray) static 批处理执行SQL语句
  • @method static string getLastInsID(string $sequence = null) static 获取最近插入的ID

think\Model

  • @method static void onAfterRead(Model $model) after_read事件定义
  • @method static mixed onBeforeInsert(Model $model) before_insert事件定义
  • @method static void onAfterInsert(Model $model) after_insert事件定义
  • @method static mixed onBeforeUpdate(Model $model) before_update事件定义
  • @method static void onAfterUpdate(Model $model) after_update事件定义
  • @method static mixed onBeforeWrite(Model $model) before_write事件定义
  • @method static void onAfterWrite(Model $model) after_write事件定义
  • @method static mixed onBeforeDelete(Model $model) before_write事件定义
  • @method static void onAfterDelete(Model $model) after_delete事件定义
  • @method static void onBeforeRestore(Model $model) before_restore事件定义
  • @method static void onAfterRestore(Model $model) after_restore事件定义
  • @method static $this scope(string|array $scope) static 查询范围
  • @method static $this where(mixed $field, string $op = null, mixed $condition = null) static 查询条件
  • @method static $this whereRaw(string $where, array $bind = [], string $logic = ‘AND’) static 表达式查询
  • @method static $this whereExp(string $field, string $condition, array $bind = [], string $logic = ‘AND’) static 字段表达式查询
  • @method static $this when(mixed $condition, mixed $query, mixed $otherwise = null) static 条件查询
  • @method static $this join(mixed $join, mixed $condition = null, string $type = ‘INNER’, array $bind = []) static JOIN查询
  • @method static $this view(mixed $join, mixed $field = null, mixed $on = null, string $type = ‘INNER’) static 视图查询
  • @method static $this with(mixed $with, callable $callback = null) static 关联预载入
  • @method static $this count(string $field = ‘*’) static Count统计查询
  • @method static $this min(string $field, bool $force = true) static Min统计查询
  • @method static $this max(string $field, bool $force = true) static Max统计查询
  • @method static $this sum(string $field) static SUM统计查询
  • @method static $this avg(string $field) static Avg统计查询
  • @method static $this field(mixed $field, boolean $except = false, string $tableName = ‘’, string $prefix = ‘’, string $alias = ‘’) static 指定查询字段
  • @method static $this fieldRaw(string $field) static 指定查询字段
  • @method static $this union(mixed $union, boolean $all = false) static UNION查询
  • @method static $this limit(mixed $offset, integer $length = null) static 查询LIMIT
  • @method static $this order(mixed $field, string $order = null) static 查询ORDER
  • @method static $this orderRaw(string $field, array $bind = []) static 查询ORDER
  • @method static $this cache(mixed $key = null, integer|\DateTime $expire = null, string $tag = null) static 设置查询缓存
  • @method static mixed value(string $field, mixed $default = null) static 获取某个字段的值
  • @method static array column(string $field, string $key = ‘’) static 获取某个列的值
  • @method static $this find(mixed $data = null) static 查询单个记录
  • @method static $this findOrFail(mixed $data = null) 查询单个记录
  • @method static \think\Model\Collection|$this[] select(mixed $data = null) static 查询多个记录
  • @method static $this get(mixed $data = null, mixed $with = [], bool $cache = false, bool $failException = false) static 查询单个记录 支持关联预载入
  • @method static $this getOrFail(mixed $data = null, mixed $with = [], bool $cache = false) static 查询单个记录 不存在则抛出异常
  • @method static $this findOrEmpty(mixed $data = null) static 查询单个记录 不存在则返回空模型
  • @method static Collection|$this[] all(mixed $data = null, mixed $with = [], bool $cache = false) static 查询多个记录 支持关联预载入
  • @method static $this withAttr(array $name, \Closure $closure = null) static 动态定义获取器
  • @method static $this withJoin(string|array $with, string $joinType = ‘’) static
  • @method static $this withCount(string|array $relation, bool $subQuery = true) static 关联统计
  • @method static $this withSum(string|array $relation, string $field, bool $subQuery = true) static 关联SUM统计
  • @method static $this withMax(string|array $relation, string $field, bool $subQuery = true) static 关联MAX统计
  • @method static $this withMin(string|array $relation, string $field, bool $subQuery = true) static 关联Min统计
  • @method static $this withAvg(string|array $relation, string $field, bool $subQuery = true) static 关联Avg统计
  • @method Paginator|$this paginate(int|array $listRows = null, int|bool $simple = false, array $config = []) static 分页
  • 5
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值