Created
November 14, 2016 02:22
-
-
Save shadowhand/c4cd6bcb2ff65b53d9ae41b047fee1f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// current proposal | |
public function process(ServerRequestInterface $request, DelegateInterface $delegate) | |
{ | |
// ... | |
return $delegate->process($request); | |
} | |
// alternative | |
public function process(ServerRequestInterface $request, DelegateInterface $next) | |
{ | |
// ... | |
return $next($request); | |
} | |
// assuming that... | |
interface DelegateInterface | |
{ | |
public function __invoke(ServerRequestInterface $request); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment