选择语言 :

 Module_OOP_ORM_Parse::de_format_data

反解数据

null Module_OOP_ORM_Parse::de_format_data( mixed $data , array $config )

参数列表

参数 类型 描述 默认值
$data mixed $data
$config array $config
File: ./modules/oop/orm/parse.class.php
public static function de_format_data($data, $config)
{
    $config = array_reverse($config);
    foreach ( $config as $v )
    {
        try
        {
            if ( is_array($v) )
            {
                $fun = 'OOP_ORM_Parse::_de_format_action_' . array_shift($v);
                array_unshift($v,$data);
                $data = call_user_func_array($fun, $v);
            }
            else
            {
                $fun = '_de_format_action_' . $v;
                $data = OOP_ORM_Parse::$fun($data);
            }
        }
        catch ( Exception $e )
        {
            Core::debug()->error('ORM数据解析失败,方法:' . $fun . '。');
        }
    }

    return $data;
}