选择语言 :

Module_OOP_ORM_Finder_REST
    └ Module_OOP_ORM

MyQEE ORM REST核心类

常量
OOP_ORM_Finder_REST::VERSION string(5) "2.3.1"
OOP_ORM_Finder_REST::PARAM_RETURN_FINDER string(6) "finder"
OOP_ORM_Finder_REST::PARAM_RETURN_SINGLE string(6) "single"
OOP_ORM_Finder_REST::PARAM_RETURN_GROUP string(5) "group"

API - Module_OOP_ORM_Finder_REST

继承自父类的方法和变量
author
呼吸二氧化碳 jonwang@myqee.com
category
Module
package
ORM
copyright
Copyright © 2008-2013 myqee.com
license
http://www.myqee.com/license.html

$this->method( $method = null)

设置,获取REST的类型

参数列表

参数 类型 描述 默认值
$method string GET|POST|DELETE|PUT 等,不传则返回当前method null
返回值
  • string
  • $this

$this->find( $query = null)

获取数据

参数列表

参数 类型 描述 默认值
$query $query 请求的参数 null
返回值
  • OOP_ORM_Result

$this->parse_api_fullurl( $query = null)

解析返回完善的请求的URL

参数列表

参数 类型 描述 默认值
$query string $query null

$this->parse_api_post_data( $query = null)

解析用于POST、PUT提交数据的数据

参数列表

参数 类型 描述 默认值
$query string $query null

$this->driver( )

HttpClient对象

返回值
  • HttpClient

$this->where( $column , $value = null, $op = '=')

设置查询条件

参数列表

参数 类型 描述 默认值
$column mixed Column name or array($column, $alias) or object
$value string Logic operator null
$op mixed Column value string(1) "="
返回值
  • OOP_ORM_Finder_REST

$this->in( $column , $value , $no_in = false)

设置 in

参数列表

参数 类型 描述 默认值
$column string $key
$value array $value
$no_in unknown bool false
返回值
  • OOP_ORM_Finder_REST

$this->order_by( $column , $direction = 'ASC')

排序

参数列表

参数 类型 描述 默认值
$column mixed Column name or array($column, $alias) or object
$direction string Direction of sorting string(3) "ASC"
返回值
  • OOP_ORM_Finder_REST

$this->parse_result_data( & $data )

解析请求回来的数据

参数列表

参数 类型 描述 默认值
$data string $data
返回值
  • array

$this->reset( )

重置请求数据

返回值
  • $this

$this->__construct( )


$this->get_orm_name( $type )

获取对象名称

参数列表

参数 类型 描述 默认值
$type string $type

$this->create( $data = null, $is_field_key = false)

创建一条数据 $is_field_key 是所传进来的数据的key是对象的键名还是字段的键名,true=字段的键名,false=对象的键名 差别在于: 由于ORM DATA的键名可以和数据库的字段名称不一样,所以在设置数据的时候需要指定是哪个数据,如果键名和数据库的字段名完全一样,这样的话则没有区别

参数列表

参数 类型 描述 默认值
$data array 数据 null
$is_field_key boolean 数据的键名是否数据库字段,默认false bool false

$this->create_group_data( $array , $is_field_key = false)

返回ORM数据对象

参数列表

参数 类型 描述 默认值
$array $array
$is_field_key boolean 数据的键名是否数据库字段,默认false bool false
返回值
  • OOP_ORM_Result

$this->set_auto_where( $auto_where )

设置自动添加条件

参数列表

参数 类型 描述 默认值
$auto_where array $auto_where

$this->clear_auto_where( )

清除自动添加条件


$this->id_field_name( )


$this->get_by_id( $id , $use_master = false)

根据ID获取对象

参数列表

参数 类型 描述 默认值
$id $id Int 对象ID
$use_master $use_master Boolean 是否使用主数据 bool false

$this->get_by_ids( $ids , $use_master = false)

根据IDs获取对象

参数列表

参数 类型 描述 默认值
$ids $use_master Boolean 是否使用主数据
$use_master unknown bool false
返回值
  • OOP_ORM_Result

$this->last_query( )

返回最后查询语句

返回值
  • string