选择语言 :

Module_OOP_ORM_Parse

ORM 字段解析器

API - Module_OOP_ORM_Parse

author
呼吸二氧化碳 jonwang@myqee.com
category
Module
package
ORM
copyright
Copyright © 2008-2013 myqee.com
license
http://www.myqee.com/license.html

$this->__construct( )


OOP_ORM_Parse::check_config( )

检查并规范ORM字段配置


OOP_ORM_Parse::_check_fieldname( $key , & $field_config , & $field_to_offset )

检查字段名

参数列表

参数 类型 描述 默认值
$key string $key
$field_config array $field_config
$field_to_offset unknown

OOP_ORM_Parse::_check_id_field( $key , & $field_config , & $id_field )

检查是否ID字段

参数列表

参数 类型 描述 默认值
$key string $key
$field_config array $field_config
$id_field unknown

OOP_ORM_Parse::_check_orm( $key , & $field_config )

检查ORM配置

参数列表

参数 类型 描述 默认值
$key string $key
$field_config array $field_config

OOP_ORM_Parse::_check_data( $key , & $field_config )

检查获取数据配置

参数列表

参数 类型 描述 默认值
$key string $key
$field_config array $field_config

OOP_ORM_Parse::_check_object( )


OOP_ORM_Parse::_parse_database( $config )

解析配置

参数列表

参数 类型 描述 默认值
$config array $field_config
返回值
  • array $field_config

OOP_ORM_Parse::format_data( $data , $config )

格式化数据

参数列表

参数 类型 描述 默认值
$data mixed $data
$config array $config

OOP_ORM_Parse::de_format_data( $data , $config )

反解数据

参数列表

参数 类型 描述 默认值
$data mixed $data
$config array $config

OOP_ORM_Parse::_format_action_serialize( )


OOP_ORM_Parse::_format_action_json( )


OOP_ORM_Parse::_format_action_gzcompress( )


OOP_ORM_Parse::_format_action_implode( $data , $exp_str = ',', $is_add_both_str = false)

拼接字符串

参数列表

参数 类型 描述 默认值
$data fixed $data
$exp_str string 默认,分割 string(1) ","
$is_add_both_str boolean 是否在两段加上$exp_str bool false
返回值
  • string

OOP_ORM_Parse::_de_format_action_implode( $data , $exp_str = ',', $is_add_both_str = false)

分割字符串

参数列表

参数 类型 描述 默认值
$data fixed $data
$exp_str string 默认,分割 string(1) ","
$is_add_both_str boolean 是否在两段加上$exp_str bool false
返回值
  • array

OOP_ORM_Parse::_de_format_action_serialize( )


OOP_ORM_Parse::_de_format_action_json( )


OOP_ORM_Parse::_de_format_action_gzcompress( )


OOP_ORM_Parse::get_cache_data( )

TODO 获取缓存数据


OOP_ORM_Parse::set_cache_data( )

TODO 设置缓存数据


OOP_ORM_Parse::get_data( $config , $obj )

根据配置获取数据

参数列表

参数 类型 描述 默认值
$config array $config
$obj unknown

OOP_ORM_Parse::_get_data_database( $config , $obj )

获取数据库配置类型的数据

参数列表

参数 类型 描述 默认值
$config array $config
$obj unknown
返回值
  • array

OOP_ORM_Parse::_get_data_function( $config , $obj )

获取function配置类型的数据

参数列表

参数 类型 描述 默认值
$config array $config
$obj unknown
返回值
  • array

OOP_ORM_Parse::_get_data_httpget( $config , $obj )

获取HttpClient配置类型的数据

参数列表

参数 类型 描述 默认值
$config array $config
$obj unknown
返回值
  • array

OOP_ORM_Parse::get_object_field_data( $obj , $callback_fun = null)

获取对象的字段数据

参数列表

参数 类型 描述 默认值
$obj fixed $obj
$callback_fun string $callback_fun null
返回值
  • fixed 返回字段数据

OOP_ORM_Parse::key_array( )


OOP_ORM_Parse::get_orm_data_by_config( $data_obj , $orm_config , $index )

根据字段ORM配置获取ORM数据

参数列表

参数 类型 描述 默认值
$data_obj OOP_ORM_Data $data_obj
$orm_config array $orm_config
$index unknown
返回值
  • mixed

OOP_ORM_Parse::_get_orm_group_data( )


OOP_ORM_Parse::get_offset_cache_data( $data_obj , $index , $cache_config )

根据offset及配额获取缓存数据(如果有)

参数列表

参数 类型 描述 默认值
$data_obj string $index
$index array $config
$cache_config unknown
返回值
  • fiexd

OOP_ORM_Parse::set_offset_cache_data( $data_obj , $index , $cache_config , $data )

根据offset及配额设置缓存数据

参数列表

参数 类型 描述 默认值
$data_obj string $index
$index array $config
$cache_config data
$data unknown
返回值
  • boolean

OOP_ORM_Parse::delete_offset_cache_data( $data_obj , $index , $cache_config )

根据offset及配额获取缓存数据(如果有)

参数列表

参数 类型 描述 默认值
$data_obj string $index
$index array $config
$cache_config unknown
返回值
  • fiexd

OOP_ORM_Parse::get_offset_cache_key( $data_obj , $index )

根据index获取一个唯一的缓存key

参数列表

参数 类型 描述 默认值
$data_obj string $index
$index unknown
返回值
  • string

OOP_ORM_Parse::get_orm_cache_data( $data_obj , $index , $config )

根据offset及配额获取缓存数据(如果有)

参数列表

参数 类型 描述 默认值
$data_obj string $index
$index array $config
$config unknown
返回值
  • fiexd

OOP_ORM_Parse::set_orm_cache_data( $data_obj , $index , $config , $data )

根据offset及配额设置缓存数据

参数列表

参数 类型 描述 默认值
$data_obj string $index
$index array $config
$config data
$data unknown
返回值
  • boolean

OOP_ORM_Parse::delete_orm_cache_data( $data_obj , $index , $config )

根据offset及配额获取缓存数据(如果有)

参数列表

参数 类型 描述 默认值
$data_obj string $index
$index array $config
$config unknown
返回值
  • fiexd

OOP_ORM_Parse::get_orm_cache_key( $data_obj , $index , $config )

根据index获取一个唯一的缓存key

参数列表

参数 类型 描述 默认值
$data_obj string $index
$index unknown
$config unknown
返回值
  • string

OOP_ORM_Parse::set_sub_offset_data( & $data , $value , $sub_field )

设置根节点数据

参数列表

参数 类型 描述 默认值
$data array $sub_field
$value fixed $data
$sub_field fixed $value
返回值
  • boolean 数据是否修改

OOP_ORM_Parse::get_sub_offset_data( $data , $sub_field , $index = null)

获取一个子节点数据

参数列表

参数 类型 描述 默认值
$data array/object 数组或对象
$sub_field array 子节点
$index unknown null