mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
修改 Model类的saveall方法 返回值
This commit is contained in:
@@ -90,23 +90,20 @@ class Response
|
||||
*/
|
||||
public function send()
|
||||
{
|
||||
|
||||
// 处理输出数据
|
||||
$data = $this->getContent();
|
||||
|
||||
// 监听response_data
|
||||
Hook::listen('response_data', $data, $this);
|
||||
|
||||
// 发送头部信息
|
||||
if (!headers_sent() && !empty($this->header)) {
|
||||
// 发送状态码
|
||||
http_response_code($this->code);
|
||||
|
||||
// 发送头部信息
|
||||
foreach ($this->header as $name => $val) {
|
||||
header($name . ':' . $val);
|
||||
}
|
||||
}
|
||||
|
||||
echo $data;
|
||||
|
||||
if (function_exists('fastcgi_finish_request')) {
|
||||
@@ -151,7 +148,6 @@ class Response
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置响应头
|
||||
* @access public
|
||||
@@ -264,17 +260,16 @@ class Response
|
||||
$content = $this->output($this->data);
|
||||
|
||||
if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable([
|
||||
$content,
|
||||
'__toString'
|
||||
])
|
||||
$content,
|
||||
'__toString',
|
||||
])
|
||||
) {
|
||||
throw new \InvalidArgumentException(sprintf('variable type error: %s', gettype($content)));
|
||||
}
|
||||
|
||||
return (string)$content;
|
||||
return (string) $content;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取状态码
|
||||
* @return integer
|
||||
|
||||
Reference in New Issue
Block a user