public function __call($fun, $args) { $fun = explode("_", $fun); $model = ucfirst($fun[0]); $method = $fun[1]; if (TS_API::$dao->model_name != $model) { TS_API::$dao = TS_D($model); } return call_user_func_array(array(TS_API::$dao, $method), $args); }