On 08/14/2016 12:32 PM, Matthieu Napoli wrote:
so I wonder why we aren't using __invoke in that interface too
That's a very good idea, it might be a good middle ground:
interface Next
{
public function __invoke(ServerRequestInterface $request) :
ResponseInterface;
}
I believe the argument MWOP made in the past is that many existing
middleware systems already use __invoke(), so PSR-15 using __invoke() as
well would make bridge code harder. A separate method makes having an
object that just calls the method from an existing __invoke() (or vice
versa) trivial.
--Larry Garfield
--
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/9c93a576-5cca-c992-d7b5-3ded5b0c1c2c%40garfieldtech.com.
For more options, visit https://groups.google.com/d/optout.