From b899a995e2fd977fbf7497b36b2dbc8d641ef398 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Wed, 10 Jun 2026 19:00:32 +0100 Subject: Started structure for middleware --- src/Contracts/Strategy.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/Contracts/Strategy.php') diff --git a/src/Contracts/Strategy.php b/src/Contracts/Strategy.php index bb877c1..fa41819 100644 --- a/src/Contracts/Strategy.php +++ b/src/Contracts/Strategy.php @@ -10,6 +10,16 @@ use Psr\Http\Message\ResponseInterface; interface Strategy { + /** + * @param Middleware[] $middlewares + * @param callable(RequestInterface): ResponseInterface $handler + */ + public function runMiddleware( + RequestInterface $request, + array $middlewares, + callable $handler, + ): ResponseInterface; + public function runRoute(RouteCall $call): ResponseInterface; public function notFound(RequestInterface $request): ResponseInterface; -- cgit v1.2.3