RequestHandlerInterface.php 535 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Psr\Http\Server;
  3. use Psr\Http\Message\ResponseInterface;
  4. use Psr\Http\Message\ServerRequestInterface;
  5. /**
  6. * Handles a server request and produces a response.
  7. *
  8. * An HTTP request handler process an HTTP request in order to produce an
  9. * HTTP response.
  10. */
  11. interface RequestHandlerInterface
  12. {
  13. /**
  14. * Handles a request and produces a response.
  15. *
  16. * May call other collaborating code to generate the response.
  17. */
  18. public function handle(ServerRequestInterface $request): ResponseInterface;
  19. }