error = $msg; return false; } /** * model error * * @param ActiveRecord $model * @return false */ public function modelError(ActiveRecord $model) { $error_msg = current($model->getFirstErrors()); return $this->error( $error_msg ); } /** * 返回错误信息 * * @return string */ public function getError() { return $this->error; } }