Response.php 799 B

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