1: <?php
2:
3: namespace Charcoal\App\Route;
4:
5: // PSR-7 (http messaging) dependencies
6: use Psr\Http\Message\RequestInterface;
7: use Psr\Http\Message\ResponseInterface;
8:
9: // Dependencies from `Pimple`
10: use Pimple\Container;
11:
12: /**
13: * Base Route Interface.
14: *
15: * Routes are simple _invokable_ objects.
16: */
17: interface RouteInterface
18: {
19: /**
20: * @param Container $container A DI container (pimple) instance.
21: * @param RequestInterface $request A PSR-7 compatible Request instance.
22: * @param ResponseInterface $response A PSR-7 compatible Response instance.
23: * @return ResponseInterface
24: */
25: public function __invoke(Container $container, RequestInterface $request, ResponseInterface $response);
26: }
27: