RequestMethodInterface.php 742 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Fig\Http\Message;
  3. /**
  4. * Defines constants for common HTTP request methods.
  5. *
  6. * Usage:
  7. *
  8. * <code>
  9. * class RequestFactory implements RequestMethodInterface
  10. * {
  11. * public static function factory(
  12. * $uri = '/',
  13. * $method = self::METHOD_GET,
  14. * $data = []
  15. * ) {
  16. * }
  17. * }
  18. * </code>
  19. */
  20. interface RequestMethodInterface
  21. {
  22. const METHOD_HEAD = 'HEAD';
  23. const METHOD_GET = 'GET';
  24. const METHOD_POST = 'POST';
  25. const METHOD_PUT = 'PUT';
  26. const METHOD_PATCH = 'PATCH';
  27. const METHOD_DELETE = 'DELETE';
  28. const METHOD_PURGE = 'PURGE';
  29. const METHOD_OPTIONS = 'OPTIONS';
  30. const METHOD_TRACE = 'TRACE';
  31. const METHOD_CONNECT = 'CONNECT';
  32. }