mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
改进App类 修正单元测试
This commit is contained in:
@@ -105,10 +105,14 @@ class App
|
||||
}
|
||||
// 输出数据到客户端
|
||||
if (isset($data)) {
|
||||
// 监听app_end
|
||||
APP_HOOK && Hook::listen('app_end', $data);
|
||||
// 自动响应输出
|
||||
return Response::send($data, '', Config::get('response_return'));
|
||||
if ($data instanceof Response) {
|
||||
return $data->send();
|
||||
} else {
|
||||
// 监听app_end
|
||||
APP_HOOK && Hook::listen('app_end', $data);
|
||||
// 自动响应输出
|
||||
return Response::send($data, '', Config::get('response_return'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ class Request
|
||||
* @param array $cookie
|
||||
* @param array $files
|
||||
* @param array $server
|
||||
* @return object
|
||||
* @return \think\Request
|
||||
*/
|
||||
public static function create($uri, $method = 'GET', $params = [], $cookie = [], $files = [], $server = [])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user