diff options
Diffstat (limited to 'src/Controller/ControllerInterface.php')
-rw-r--r-- | src/Controller/ControllerInterface.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Controller/ControllerInterface.php b/src/Controller/ControllerInterface.php new file mode 100644 index 0000000..5fbce25 --- /dev/null +++ b/src/Controller/ControllerInterface.php @@ -0,0 +1,18 @@ +<?php + +namespace Jasny; + +/** + * 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); +} |