__call() __call(mixed $name, mixed $parameters) : mixed Parameters mixed $name mixed $parameters Returns mixed —
add() add(mixed $data = '', array $options = array(), bool $replace = false) : mixed 新增数据 Parameters mixed $data 数据 array $options 表达式 bool $replace 是否replace Returns mixed —
addAll() addAll(mixed $dataList, mixed $options = array(), mixed $replace = false) : mixed Parameters mixed $dataList mixed $options mixed $replace Returns mixed —
selectAdd() selectAdd(string $fields = '', string $table = '', array $options = array()) : bool 通过Select方式添加记录 Parameters string $fields 要插入的数据表字段名 string $table 要插入的数据表名 array $options 表达式 Returns bool —
save() save(mixed $data = '', array $options = array()) : bool 保存数据 Parameters mixed $data 数据 array $options 表达式 Returns bool —
select() select(array $options = array()) : mixed 查询数据集 Parameters array $options 表达式参数 Returns mixed —
buildSql() buildSql(array $options = array()) : string 生成查询SQL 可用于子查询 Parameters array $options 表达式参数 Returns string —
parseFieldsMap() parseFieldsMap(array $data, int $type = 1) : array 处理字段映射 Parameters array $data 当前数据 int $type 类型 0 写入 1 读取 Returns array —
setField() setField(string|array $field, string $value = '') : bool 设置记录的某个字段值 支持使用数据库字段和方法 Parameters string|array $field 字段名 string $value 字段值 Returns bool —
setInc() setInc(string $field, int $step = 1) : bool 字段值增长 Parameters string $field 字段名 int $step 增长值 Returns bool —
setDec() setDec(string $field, int $step = 1) : bool 字段值减少 Parameters string $field 字段名 int $step 减少值 Returns bool —
getField() getField(string $field, mixed $sepa = null) : mixed 获取一条记录的某个字段值 Parameters string $field 字段名 mixed $sepa Returns mixed —
create() create(mixed $data = '', string $type = '') : mixed 创建数据对象 但不保存到数据库 Parameters mixed $data 创建数据 string $type 状态 Returns mixed —
regex() regex(string $value, string $rule) : bool 使用正则验证数据 Parameters string $value 要验证的数据 string $rule 验证规则 Returns bool —
check() check(string $value, mixed $rule, string $type = 'regex') : bool 验证数据 支持 in between equal length regex expire ip_allow ip_deny Parameters string $value 验证数据 mixed $rule 验证表达式 string $type 验证方式 默认为正则验证 Returns bool —
query() query(string $sql, mixed $parse = false) : mixed SQL查询 Parameters string $sql SQL指令 mixed $parse 是否需要解析SQL Returns mixed —
execute() execute(string $sql, mixed $parse = false) : false 执行SQL语句 Parameters string $sql SQL指令 mixed $parse 是否需要解析SQL Returns false — | integer
db() db(int $linkNum = 1, mixed $config = '', bool $force = false) : \Model 切换当前的数据库连接 Parameters int $linkNum 连接序号 mixed $config 数据库连接信息 bool $force 强制重新连接 Returns \Model —
join() join(mixed $join, string $type = 'INNER') : \Model 查询SQL组装 join Parameters mixed $join string $type JOIN类型 Returns \Model —
union() union(mixed $union, bool $all = false) : \Model 查询SQL组装 union Parameters mixed $union bool $all Returns \Model —
cache() cache(mixed $key = true, int $expire = null, string $type = '') : \Model 查询缓存 Parameters mixed $key int $expire string $type Returns \Model —
field() field(mixed $field, bool $except = false) : \Model 指定查询字段 支持字段排除 Parameters mixed $field bool $except 是否排除 Returns \Model —
scope() scope(mixed $scope = '', array $args = NULL) : \Model 调用命名范围 Parameters mixed $scope 命名范围名称 支持多个 和直接定义 array $args 参数 Returns \Model —
where() where(mixed $where, mixed $parse = null) : \Model 指定查询条件 支持安全过滤 Parameters mixed $where 条件表达式 mixed $parse 预处理参数 Returns \Model —
limit() limit(mixed $offset, mixed $length = null) : \Model 指定查询数量 Parameters mixed $offset 起始位置 mixed $length 查询数量 Returns \Model —
page() page(mixed $page, mixed $listRows = null) : \Model 指定分页 Parameters mixed $page 页数 mixed $listRows 每页数量 Returns \Model —
bind() bind(string $key, mixed $value = false) : \Model 参数绑定 Parameters string $key 参数名 mixed $value 绑定的变量及绑定参数 Returns \Model —
setProperty() setProperty(string $name, mixed $value) : \Model 设置模型的属性值 Parameters string $name 名称 mixed $value 值 Returns \Model —
_before_insert() _before_insert(mixed $data, mixed $options) : mixed Parameters mixed $data mixed $options Returns mixed —
_after_insert() _after_insert(mixed $data, mixed $options) : mixed Parameters mixed $data mixed $options Returns mixed —
_before_update() _before_update(mixed $data, mixed $options) : mixed Parameters mixed $data mixed $options Returns mixed —
_after_update() _after_update(mixed $data, mixed $options) : mixed Parameters mixed $data mixed $options Returns mixed —
_after_delete() _after_delete(mixed $data, mixed $options) : mixed Parameters mixed $data mixed $options Returns mixed —
_after_select() _after_select(mixed $resultSet, mixed $options) : mixed Parameters mixed $resultSet mixed $options Returns mixed —
_parseOptions() _parseOptions(array $options = array()) : array 分析表达式 Parameters array $options 表达式参数 Returns array —
_parseType() _parseType(mixed $data, string $key) : void 数据类型检测 Parameters mixed $data 数据 string $key 字段名
_after_find() _after_find(mixed $result, mixed $options) : mixed Parameters mixed $result mixed $options Returns mixed —
returnResult() returnResult(mixed $data, mixed $type = '') : mixed Parameters mixed $data mixed $type Returns mixed —
autoValidation() autoValidation(array $data, string $type) : bool 自动表单验证 Parameters array $data 创建数据 string $type 创建类型 Returns bool —
_validationField() _validationField(array $data, array $val) : bool 验证表单字段 支持批量验证 如果批量验证返回错误的数组信息 Parameters array $data 创建数据 array $val 验证因子 Returns bool —
_validationFieldItem() _validationFieldItem(array $data, array $val) : bool 根据验证因子验证字段 Parameters array $data 创建数据 array $val 验证因子 Returns bool —
parseSql() parseSql(string $sql, bool $parse) : string 解析SQL语句 Parameters string $sql SQL指令 bool $parse 是否需要解析SQL Returns string —
checkCondition() checkCondition(mixed $where) : array 检查条件中的视图字段 Parameters mixed $where Returns array —
checkOrder() checkOrder(string $order = '') : string 检查Order表达式中的视图字段 Parameters string $order 字段 Returns string —
checkGroup() checkGroup(string $group = '') : string 检查Group表达式中的视图字段 Parameters string $group 字段 Returns string —
checkFields() checkFields(string $fields = '') : string 检查fields表达式中的视图字段 Parameters string $fields 字段 Returns string —
autoOperation() autoOperation(array $data, string $type) : mixed 自动表单处理 Parameters array $data 创建数据 string $type 创建类型 Returns mixed —
_checkFields() _checkFields(string $name, array $fields) : array 检查是否定义了所有字段 Parameters string $name 模型名称 array $fields 字段数组 Returns array —