This commit is contained in:
2020-08-31 22:33:50 +08:00
parent 32913fa3e1
commit 8b583f2a4d
14 changed files with 450 additions and 102 deletions
+1 -2
View File
@@ -10,7 +10,6 @@ namespace HttpServer\Route;
use Closure;
use Exception;
use HttpServer\IInterface\IMiddleware;
use HttpServer\Route\Dispatch\Dispatch;
/**
@@ -65,7 +64,7 @@ class Middleware
{
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
if ($pipe instanceof IMiddleware) {
if ($pipe instanceof \HttpServer\IInterface\Middleware) {
return $pipe->handler($passable, $stack);
} else {
return $pipe($passable, $stack);