File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
namespace Yiisoft \Middleware \Dispatcher ;
6
6
7
+ use Psr \Http \Server \MiddlewareInterface ;
7
8
use Psr \Http \Server \RequestHandlerInterface ;
8
9
10
+ /**
11
+ * A stack of PSR-15 middlewares to be used with {@see MiddlewareDispatcher}.
12
+ * @see https://www.php-fig.org/psr/psr-15/
13
+ */
9
14
interface MiddlewareStackInterface extends RequestHandlerInterface
10
15
{
16
+ /**
17
+ * Builds a middleware stack from an array of middleware instances and a fallback request handler.
18
+ * If the middlewares array is empty, only the fallback handler will be used.
19
+ *
20
+ * @param MiddlewareInterface[] $middlewares Middlewares being composed to stack. Can be empty.
21
+ * @param RequestHandlerInterface $fallbackHandler Fallback request handler.
22
+ *
23
+ * @return self
24
+ */
11
25
public function build (array $ middlewares , RequestHandlerInterface $ fallbackHandler ): self ;
12
26
27
+ /**
28
+ * Clears the middleware stack and fallback request handler.
29
+ */
13
30
public function reset (): void ;
14
31
32
+ /**
33
+ * @return bool Whether there are any middlewares or fallback request handler bound.
34
+ */
15
35
public function isEmpty (): bool ;
16
36
}
You can’t perform that action at this time.
0 commit comments