Files
OMS/app/console/lib/event/response.php
2025-12-28 23:13:25 +08:00

51 lines
1.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
class console_event_response{
private $_response = '';
function __construct(){
// $this->_response = kernel::single('middleware_message');
}
/**
* send_succ
* @param mixed $msg msg
* @return mixed 返回值
*/
public function send_succ($msg=''){
// return $this->_response->output('succ');
$rs = array(
'rsp' => 'succ',
'msg' => $msg,
'msg_code' => null,
'data' => null,
);
return $rs;
}
/**
* send_error
* @param mixed $msg msg
* @param mixed $msg_code msg_code
* @param mixed $data 数据
* @return mixed 返回值
*/
public function send_error($msg, $msg_code=null, $data=null){
// return $this->_response->output($rsp='fail', $msg, $msg_code, $data);
$rs = array(
'rsp' => 'fail',
'msg' => $msg,
'msg_code' => $msg_code,
'data' => $data,
);
return $rs;
}
}