Skip to content

Commit d9d6c57

Browse files
committed
Merge branch 'feature/request-method-interface'
Close php-fig/http-message#62
2 parents e40e168 + 7fe250c commit d9d6c57

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

src/RequestMethodInterface.php

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

0 commit comments

Comments
 (0)