You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,10 +173,10 @@ public function handleRequest(Request $request, RequestHandler $next): Response
173
173
`handleRequest` is the only method of the `Middleware` interface. If the `Middleware` doesn't handle the request itself, it should delegate the response creation to the received `RequestHandler`.
174
174
175
175
```php
176
-
function stack(RequestHandler $handler, Middleware ...$middleware): RequestHandler
176
+
function stackMiddleware(RequestHandler $handler, Middleware ...$middleware): RequestHandler
177
177
```
178
178
179
-
Multiple middlewares can be stacked by using `Amp\Http\Server\Middleware\stack()`, which accepts a `RequestHandler` as first argument and a variable number of `Middleware` instances. The returned `RequestHandler` will invoke each middleware in the provided order.
179
+
Multiple middlewares can be stacked by using `Amp\Http\Server\Middleware\stackMiddleware()`, which accepts a `RequestHandler` as first argument and a variable number of `Middleware` instances. The returned `RequestHandler` will invoke each middleware in the provided order.
180
180
181
181
```php
182
182
$requestHandler = new class implements RequestHandler {
@@ -202,7 +202,7 @@ $middleware = new class implements Middleware {
0 commit comments