Response.php 818 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * A HTTP Response specific interface that adds the methods required
  4. * by HTTP responses. Over and above [KO7_HTTP_Interaction], this
  5. * interface provides status.
  6. *
  7. * @package KO7
  8. * @category HTTP
  9. *
  10. * @since 3.1.0
  11. * @copyright (c) 2007-2016 Kohana Team
  12. * @copyright (c) since 2016 Koseven Team
  13. * @license https://koseven.dev/LICENSE
  14. */
  15. interface KO7_HTTP_Response extends HTTP_Message {
  16. /**
  17. * Sets or gets the HTTP status from this response.
  18. *
  19. * // Set the HTTP status to 404 Not Found
  20. * $response = Response::factory()
  21. * ->status(404);
  22. *
  23. * // Get the current status
  24. * $status = $response->status();
  25. *
  26. * @param integer $code Status to set to this response
  27. * @return mixed
  28. */
  29. public function status($code = NULL);
  30. }