I really like this change and see a lot of potential to HandlerInterface. In my 
opinion, DelegateInterface could be removed and HandlerInterface used instead. 
I don’t see any value having two interfaces doing the same.
Regards.
Oscar Otero.

> El 15 jul 2017, a las 17:39, Woody Gilk <[email protected]> escribió:
> 
> Hello FIG & company,
> 
> I wanted to send a quick progress report on PSR-15. Life has been busy and 
> the working group is doing its best to finish this up.
> 
> The first order of business is addressing the concerns brought up by Rasmus 
> and Michael in this thread:
> 
> https://groups.google.com/d/msg/php-fig/B3jtdJA7-6w/jzgSPrpYAQAJ 
> <https://groups.google.com/d/msg/php-fig/B3jtdJA7-6w/jzgSPrpYAQAJ>
> 
> PSR-15 will define HandlerInterface, MiddlewareInterface, and 
> DelegateInterface. These will be two separate packages (names subject to 
> change):
> 
> psr/http-server-handler (handler)
> psr/http-server-middleware (middleware + delegate, depends on handler)
> 
> The HandlerInterface signature will be:
> 
> __invoke(ServerRequestInterface $request): ResponseInterface
> 
> The MiddlewareInterface signature will be:
> 
> process(ServerRequestInterface $request, DelegateInterface $delegate): 
> ResponseInterface
> 
> The DelegateInterface will simply be an extension of HandlerInterface. (Are 
> we certain we need delegate?)
> 
> As such, a middleware would look something like this:
> 
> function process(ServerRequestInterface $request, DelegateInterface $delegate)
> {
>     if ($this->isNotValid($request)) {
>         // create ResponseInterface error
>         return $response;
>     }
> 
>     // all good, continue processing
>     return $delegate($request);
> }
> 
> As always, feedback and thoughts on this proposal are appreciated.
> 
> --
> Woody Gilk
> http://about.me/shadowhand <http://about.me/shadowhand>
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "PHP Framework Interoperability Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/php-fig/CAGOJM6%2Bz%2BFwfg9XTj%3D4BV36xm6Do-iHoUJ8p%3DH5x6MxAHJgggA%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/php-fig/CAGOJM6%2Bz%2BFwfg9XTj%3D4BV36xm6Do-iHoUJ8p%3DH5x6MxAHJgggA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/880E5E55-D5FF-452F-9D14-0FF8656A53EE%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to