From 8e823e1cbcc3bd63051541840026c88eaebea75c Mon Sep 17 00:00:00 2001 From: webimpress Date: Thu, 5 Oct 2017 23:58:23 +0100 Subject: [PATCH] Fixed documentation to reflect HANDLER_METHOD constant --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e99f3a3..b5c7b59 100644 --- a/README.md +++ b/README.md @@ -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