diff options
| author | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
|---|---|---|
| committer | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
| commit | b899a995e2fd977fbf7497b36b2dbc8d641ef398 (patch) | |
| tree | e35680ea490fb486da43012bbfaaee8b7ee27f8c /src/Contracts/Strategy.php | |
| parent | 57e101668e62aab7d332c1c2f403eee9511de626 (diff) | |
Started structure for middleware
Diffstat (limited to 'src/Contracts/Strategy.php')
| -rw-r--r-- | src/Contracts/Strategy.php | 10 |
1 files changed, 10 insertions, 0 deletions
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; |
