This commit is contained in:
as2252258@163.com
2021-08-28 02:08:20 +08:00
parent 567d440dcd
commit 5e1a3f7148
5 changed files with 20 additions and 32 deletions
+1 -3
View File
@@ -7,7 +7,6 @@ namespace Annotation\Route;
use Annotation\Attribute;
use Http\Route\MiddlewareManager;
use ReflectionException;
use Kiri\Kiri;
use Http\IInterface\MiddlewareInterface ;
/**
@@ -49,8 +48,7 @@ use Http\IInterface\MiddlewareInterface ;
*/
public function execute(mixed $class, mixed $method = null): static
{
$middleware = Kiri::getDi()->get(MiddlewareManager::class);
$middleware->addMiddlewares($class, $method, $this->middleware);
MiddlewareManager::addMiddlewares($class, $method, $this->middleware);
return $this;
}