1 | <?php |
||
36 | class HttpMethod { |
||
37 | |||
38 | /** http methods */ |
||
39 | const HEAD = "HEAD"; |
||
40 | const OPTIONS = "OPTIONS"; |
||
41 | const TRACE = "TRACE"; |
||
42 | const CONNECT = "CONNECT"; |
||
43 | const GET = "GET"; |
||
44 | const POST = "POST"; |
||
45 | const PUT = "PUT"; |
||
46 | const PATCH = "PATCH"; |
||
47 | const DELETE = "DELETE"; |
||
48 | |||
49 | /** @var string */ |
||
50 | private $method; |
||
51 | |||
52 | /** |
||
53 | * Class constructor |
||
54 | * @param string $method the http method |
||
55 | * @throws \Brickoo\Component\Http\Exception\InvalidHttpMethodException |
||
56 | */ |
||
57 | 2 | public function __construct($method) { |
|
66 | |||
67 | /** |
||
68 | * Returns the method string representation in uppercase. |
||
69 | * return string the method representation |
||
70 | */ |
||
71 | 1 | public function toString() { |
|
74 | |||
75 | /** |
||
76 | * Checks if the method is valid. |
||
77 | * @param string $method |
||
78 | * @return boolean result |
||
79 | */ |
||
80 | 2 | private function isValid($method) { |
|
83 | |||
84 | } |
||
85 |