diff options
author | Arnold Daniels <arnold@jasny.net> | 2017-02-09 12:54:41 +0100 |
---|---|---|
committer | Arnold Daniels <arnold@jasny.net> | 2017-02-09 14:54:53 +0100 |
commit | 9f2e0789a87685d6ba8f2cf10ee345d64771d95e (patch) | |
tree | 9f49f5b9543d7f8319fb91105a1c89fb3f10eecd /src/ControllerInterface.php | |
parent | 142aa6e66c0559b03278f8f62ecec5747b8e019e (diff) | |
download | controller-9f2e0789a87685d6ba8f2cf10ee345d64771d95e.zip controller-9f2e0789a87685d6ba8f2cf10ee345d64771d95e.tar.gz controller-9f2e0789a87685d6ba8f2cf10ee345d64771d95e.tar.bz2 |
Fixed issues with controllerinterface and tests
Diffstat (limited to 'src/ControllerInterface.php')
-rw-r--r-- | src/ControllerInterface.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ControllerInterface.php b/src/ControllerInterface.php new file mode 100644 index 0000000..8225457 --- /dev/null +++ b/src/ControllerInterface.php @@ -0,0 +1,21 @@ +<?php + +namespace Jasny; + +use Psr\Http\Message\ServerRequestInterface; +use Psr\Http\Message\ResponseInterface; + +/** + * Interface for controllers + */ +interface ControllerInterface +{ + /** + * Run the controller as function + * + * @param ServerRequestInterface $request + * @param ResponseInterface $response + * @return ResponseInterface + */ + public function __invoke(ServerRequestInterface $request, ResponseInterface $response); +} |