Ejemplo n.º 1
0
 static function model($model)
 {
     $return = NULL;
     $model = HC_App::full_model($model);
     if (method_exists($model, 'get_instance')) {
         $return = call_user_func(array($model, 'get_instance'));
         // $return = $model::get_instance();
     } elseif (class_exists($model)) {
         $return = new $model();
     }
     return $return;
 }