mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
增加response_start标签位 路由增加response方法用于绑定response处理行为
This commit is contained in:
@@ -92,6 +92,9 @@ class Response
|
||||
// 处理输出数据
|
||||
$data = $this->getContent();
|
||||
|
||||
// 监听response_start
|
||||
Hook::listen('response_start', $this);
|
||||
|
||||
// Trace调试注入
|
||||
if (Env::get('app_trace', Config::get('app_trace'))) {
|
||||
Debug::inject($this, $data);
|
||||
|
||||
@@ -1449,6 +1449,10 @@ class Route
|
||||
$request->bind($bind);
|
||||
}
|
||||
|
||||
if (!empty($option['response'])) {
|
||||
Hook::add('response_start', $option['response']);
|
||||
}
|
||||
|
||||
// 解析额外参数
|
||||
self::parseUrlParams(empty($paths) ? '' : implode('|', $paths), $matches);
|
||||
// 记录匹配的路由信息
|
||||
|
||||
Reference in New Issue
Block a user