返回ORM数据对象
OOP_ORM_Result Module_OOP_ORM::create_group_data( $array $array [, boolean $is_field_key = bool false ] )
参数列表
参数 类型 描述 默认值 $array
$array
$is_field_key
boolean
数据的键名是否数据库字段,默认false bool false
OOP_ORM_Result
public function create_group_data($array, $is_field_key = false)
{
$data = array();
if ( is_array($array) ) foreach ( $array as $k => $v )
{
$data[$k] = $this->create($v, $is_field_key);
}
$result_name = $this->get_orm_name('result');
if ( !class_exists($result_name, false) )
{
if (IS_DEBUG)
{
static $no_result = array();
if ( !isset($no_result[$result_name]) )
{
Core::debug()->info('指定的' . $result_name . '对象不存在。');
$no_result[$result_name] = true;
}
}
$result_name = 'OOP_ORM_Result';
}
return new $result_name($data);
}