File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 33Yii works with HTTP using the abstraction layer built around [ PSR-7 HTTP message interfaces] ( https://www.php-fig.org/psr/psr-7/ )
44and [ PSR-15 request handler/middleware interfaces] ( https://www.php-fig.org/psr/psr-15/ ) .
55
6- The application is composed of one or several middleware. When the URL is requested, the request object is passed to
7- the middleware dispatcher that starts executing middleware. Each middleware, given the request, can:
6+ The application is composed of one or several middleware. Middleware runs between request and response.
7+ When the URL is requested, the request object is passed to the middleware dispatcher that starts executing middleware one after another.
8+ Each middleware, given the request, can:
89
9- - Pass request to the next middleware or return a response.
10- - Perform some work before and after the next middleware .
10+ - Pass the request to the next middleware performing some work before / after it.
11+ - Form the response and return it .
1112
1213Depending on middleware used, application behavior may vary significantly.
1314
@@ -112,7 +113,7 @@ To create middleware, you need to implement a single `process` method of `Psr\Ht
112113public function process(ServerRequestInterface $request, RequestHandlerInterface $next): ResponseInterface;
113114```
114115
115- There are many ways to handle request and choosing one depends on what the middleware should achieve.
116+ There are multiple ways to handle request and choosing one depends on what the middleware should achieve.
116117
117118### Forming response directly
118119
You can’t perform that action at this time.
0 commit comments