File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323 },
2424 "autoload" : {
2525 "psr-4" : {
26- "Interop\\ Http\\ ServerMiddleware \\ " : " src/"
26+ "Interop\\ Http\\ Server \\ " : " src/"
2727 }
2828 },
2929 "extra" : {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11<?php
22
3- namespace Interop \Http \ServerMiddleware ;
3+ namespace Interop \Http \Server ;
44
55use Psr \Http \Message \ResponseInterface ;
66use Psr \Http \Message \ServerRequestInterface ;
77
8+ /**
9+ * An HTTP middleware component participates in processing an HTTP message,
10+ * either by acting on the request or the response. This interface defines the
11+ * methods required to use the middleware.
12+ */
813interface MiddlewareInterface
914{
1015 /**
1116 * Process an incoming server request and return a response, optionally delegating
12- * to the next middleware component to create the response .
17+ * response creation to a handler .
1318 *
1419 * @param ServerRequestInterface $request
15- * @param DelegateInterface $delegate
20+ * @param RequestHandlerInterface $handler
1621 *
1722 * @return ResponseInterface
1823 */
19- public function process (ServerRequestInterface $ request , DelegateInterface $ delegate );
24+ public function process (ServerRequestInterface $ request , RequestHandlerInterface $ handler );
2025}
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Interop \Http \Server ;
4+
5+ use Psr \Http \Message \ResponseInterface ;
6+ use Psr \Http \Message \ServerRequestInterface ;
7+
8+ /**
9+ * An HTTP request handler process a HTTP request and produces an HTTP response.
10+ * This interface defines the methods require to use the request handler.
11+ */
12+ interface RequestHandlerInterface
13+ {
14+ /**
15+ * Handle the request and return a response.
16+ *
17+ * @param ServerRequestInterface $request
18+ *
19+ * @return ResponseInterface
20+ */
21+ public function handle (ServerRequestInterface $ request );
22+ }
You can’t perform that action at this time.
0 commit comments