Created
June 4, 2019 21:34
-
-
Save djmetzle/c73d0eaa7aca042b7364921423622ebe to your computer and use it in GitHub Desktop.
a new attempt at a controller interface
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
<? | |
declare(strict_types = 1); | |
namespace iFixit\Framework\Interfaces; | |
abstract class AbstractController { | |
abstract public function routes(): RouteList {} | |
} |
On a second pass here, i was mistaken about injecting a DI container into route handlers. We should be injecting the Request
object though.
Revised handler signature:
public function <handle>(Request $request, ...$getParams): Reponse {}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
functions should implement something like: