ResponseFactoryInterface.php 546 B

12345678910111213141516171819
  1. <?php
  2. namespace Psr\Http\Message;
  3. interface ResponseFactoryInterface
  4. {
  5. /**
  6. * Create a new response.
  7. *
  8. * @param int $code HTTP status code; defaults to 200
  9. * @param string $reasonPhrase Reason phrase to associate with status code
  10. * in generated response; if none is provided implementations MAY use
  11. * the defaults as suggested in the HTTP specification.
  12. *
  13. * @return ResponseInterface
  14. */
  15. public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface;
  16. }