ORM 字段解析器
API - Module_OOP_ORM_Parse
- OOP_ORM_Parse::__construct
- OOP_ORM_Parse::check_config - 检查并规范ORM字段配置
- OOP_ORM_Parse::format_data - 格式化数据
- OOP_ORM_Parse::de_format_data - 反解数据
- OOP_ORM_Parse::get_cache_data - TODO 获取缓存数据
- OOP_ORM_Parse::set_cache_data - TODO 设置缓存数据
- OOP_ORM_Parse::get_data - 根据配置获取数据
- OOP_ORM_Parse::get_object_field_data - 获取对象的字段数据
- OOP_ORM_Parse::key_array
- OOP_ORM_Parse::get_orm_data_by_config - 根据字段ORM配置获取ORM数据
- OOP_ORM_Parse::get_offset_cache_data - 根据offset及配额获取缓存数据(如果有)
- OOP_ORM_Parse::set_offset_cache_data - 根据offset及配额设置缓存数据
- OOP_ORM_Parse::delete_offset_cache_data - 根据offset及配额获取缓存数据(如果有)
- OOP_ORM_Parse::get_offset_cache_key - 根据index获取一个唯一的缓存key
- OOP_ORM_Parse::get_orm_cache_data - 根据offset及配额获取缓存数据(如果有)
- OOP_ORM_Parse::set_orm_cache_data - 根据offset及配额设置缓存数据
- OOP_ORM_Parse::delete_orm_cache_data - 根据offset及配额获取缓存数据(如果有)
- OOP_ORM_Parse::get_orm_cache_key - 根据index获取一个唯一的缓存key
- OOP_ORM_Parse::set_sub_offset_data - 设置根节点数据
- OOP_ORM_Parse::get_sub_offset_data - 获取一个子节点数据
- OOP_ORM_Parse::get_object_vars
检查并规范ORM字段配置
检查字段名
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$key |
string |
$key | |
$field_config |
array |
$field_config | |
$field_to_offset |
unknown |
检查是否ID字段
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$key |
string |
$key | |
$field_config |
array |
$field_config | |
$id_field |
unknown |
检查ORM配置
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$key |
string |
$key | |
$field_config |
array |
$field_config |
检查获取数据配置
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$key |
string |
$key | |
$field_config |
array |
$field_config |
解析配置
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$config |
array |
$field_config |
array
$field_config格式化数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data |
mixed |
$data | |
$config |
array |
$config |
反解数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data |
mixed |
$data | |
$config |
array |
$config |
拼接字符串
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data |
fixed |
$data | |
$exp_str |
string |
默认,分割 | string(1) "," |
$is_add_both_str |
boolean |
是否在两段加上$exp_str | bool false |
string
分割字符串
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data |
fixed |
$data | |
$exp_str |
string |
默认,分割 | string(1) "," |
$is_add_both_str |
boolean |
是否在两段加上$exp_str | bool false |
array
TODO 获取缓存数据
TODO 设置缓存数据
根据配置获取数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$config |
array |
$config | |
$obj |
unknown |
获取数据库配置类型的数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$config |
array |
$config | |
$obj |
unknown |
array
获取function配置类型的数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$config |
array |
$config | |
$obj |
unknown |
array
获取HttpClient配置类型的数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$config |
array |
$config | |
$obj |
unknown |
array
获取对象的字段数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$obj |
fixed |
$obj | |
$callback_fun |
string |
$callback_fun | null |
fixed
返回字段数据根据字段ORM配置获取ORM数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data_obj |
OOP_ORM_Data |
$data_obj | |
$orm_config |
array |
$orm_config | |
$index |
unknown |
mixed
根据offset及配额获取缓存数据(如果有)
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data_obj |
string |
$index | |
$index |
array |
$config | |
$cache_config |
unknown |
fiexd
根据offset及配额设置缓存数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data_obj |
string |
$index | |
$index |
array |
$config | |
$cache_config |
data |
||
$data |
unknown |
boolean
根据offset及配额获取缓存数据(如果有)
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data_obj |
string |
$index | |
$index |
array |
$config | |
$cache_config |
unknown |
fiexd
根据index获取一个唯一的缓存key
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data_obj |
string |
$index | |
$index |
unknown |
string
根据offset及配额获取缓存数据(如果有)
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data_obj |
string |
$index | |
$index |
array |
$config | |
$config |
unknown |
fiexd
根据offset及配额设置缓存数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data_obj |
string |
$index | |
$index |
array |
$config | |
$config |
data |
||
$data |
unknown |
boolean
根据offset及配额获取缓存数据(如果有)
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data_obj |
string |
$index | |
$index |
array |
$config | |
$config |
unknown |
fiexd
根据index获取一个唯一的缓存key
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data_obj |
string |
$index | |
$index |
unknown |
||
$config |
unknown |
string
设置根节点数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data |
array |
$sub_field | |
$value |
fixed |
$data | |
$sub_field |
fixed |
$value |
boolean
数据是否修改获取一个子节点数据
参数 | 类型 | 描述 | 默认值 |
---|---|---|---|
$data |
array/object |
数组或对象 | |
$sub_field |
array |
子节点 | |
$index |
unknown |
null |