mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
改进Route类的路由匹配后的后置行为 允许单独执行输出 并废除 response_auto_output 配置参数
This commit is contained in:
@@ -525,7 +525,10 @@ class Route
|
||||
// 匹配到路由规则
|
||||
// 检测是否定义路由
|
||||
if (!empty($option['after_behavior'])) {
|
||||
Hook::exec($option['after_behavior'], $route);
|
||||
$result = Hook::exec($option['after_behavior'], $route);
|
||||
if (false === $result) {
|
||||
return ['type' => 'finish'];
|
||||
}
|
||||
}
|
||||
if ($route instanceof \Closure) {
|
||||
// 执行闭包
|
||||
|
||||
Reference in New Issue
Block a user