summaryrefslogtreecommitdiff
path: root/src/Contracts/Middleware.php
blob: 69a78965f33d65d573683514844dac6dd642ce5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

declare(strict_types=1);

namespace Lightscale\Router\Contracts;

use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;

interface Middleware
{
    /** @param callable(ServerRequestInterface): ResponseInterface $next */
    public function handle(
        ServerRequestInterface $request,
        callable $next,
    ): ResponseInterface;
}