Am Dienstag, 21. Februar 2017 20:50:10 UTC+1 schrieb John Porter:
>
> Can you explain what you mean by prototype related issues?
>

I only see some issues with your code which are unrelated to your idea, 
that's all.

Where would the computation time be added, to a request or response? Can 
> you show me how you’d achieve it with the double pass method, and I can 
> show you the alternative.
>

No implementation of a another middleware needed, but 
Middlewares\ResponseTime 
<https://github.com/middlewares/response-time/blob/master/src/ResponseTime.php> 
would 
be an example. Anyway with a PSR-15 stack dispatcher, like 
Middlewares\Utils\Dispatcher 
<https://github.com/middlewares/utils#dispatcher>, we can do:

$dispatcher = new Dispatcher([
    new ResponseTimeMiddleware(),
    new AuthMiddleware(),
    …
]);

$response = $dispatcher->dispatch(new ServerRequest());

-- 
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/1fa4b0dc-2ae5-40ac-a7da-86b18bc33baa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to