Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
Fixed documentation to reflect HANDLER_METHOD constant
Browse files Browse the repository at this point in the history
  • Loading branch information
michalbundyra committed Oct 5, 2017
1 parent 793d218 commit 8e823e1
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ class MyMiddleware implements MiddlewareInterface
Both interfaces are just aliases. It allows your middleware to work with
currently installed version of `http-interop/http-middleware` library.

### Handler method in 0.5.0

In release 0.5.0 of http-middleware handler method has been changed from
`process` to `handle`. We want support both, so we deliver helper method
`Webimpress\HttpMiddlewareCompatibility\Handler::getMethodName()`. Here is an
example how you can use it in your middleware:
### Delegate/Handler method

The method name was changed across the different versions of
`http-interop/http-middleware`. First the method was called `next` (release
0.1.1), then `process` (from 0.2 - 0.4.1) and then `handle` (in 0.5.0).
To accomplish all of them we provide constant
`Webimpress\HttpMiddlewareCompatibility\HANDLER_METHOD`, which has
appropriate value depends on used version of http-middleware.
Here is an example how you can use it in your middleware:

```php
<?php
Expand Down

0 comments on commit 8e823e1

Please sign in to comment.