This commit is contained in:
2021-08-19 11:00:04 +08:00
parent 32d4d0f820
commit 1ded86021a
3 changed files with 6 additions and 7 deletions
+2 -4
View File
@@ -7,9 +7,8 @@ namespace Annotation\Route;
use Annotation\Attribute;
use Http\Route\MiddlewareManager;
use ReflectionException;
use Kiri\Exception\NotFindClassException;
use Kiri\Kiri;
use Http\IInterface\MiddlewareInterface as IMiddleware;
use Http\IInterface\MiddlewareInterface ;
/**
* Class Middleware
@@ -33,7 +32,7 @@ use Http\IInterface\MiddlewareInterface as IMiddleware;
$array = [];
foreach ($this->middleware as $value) {
$sn = di($value);
if (!($sn instanceof IMiddleware)) {
if (!($sn instanceof MiddlewareInterface)) {
continue;
}
$array[] = [$sn, 'onHandler'];
@@ -47,7 +46,6 @@ use Http\IInterface\MiddlewareInterface as IMiddleware;
* @param mixed|null $method
* @return $this
* @throws ReflectionException
* @throws NotFindClassException
*/
public function execute(mixed $class, mixed $method = null): static
{