summaryrefslogtreecommitdiffstats
path: root/src/Controller/ControllerInterface.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Controller/ControllerInterface.php')
-rw-r--r--src/Controller/ControllerInterface.php18
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);
+}