@@ -20,6 +20,9 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | const PARAMETER_IDENTIFIER = ':'; |
| 22 | 22 | |
| 23 | + /** |
|
| 24 | + * @param string $path |
|
| 25 | + */ |
|
| 23 | 26 | public function __construct($path) { |
| 24 | 27 | $this->path = $path; |
| 25 | 28 | } |
@@ -181,9 +181,9 @@ |
||
| 181 | 181 | private function overrideMethod() { |
| 182 | 182 | if($this->requestMethod === 'HEAD') { |
| 183 | 183 | $this->requestMethod = 'GET'; |
| 184 | - }elseif($this->requestMethod === 'POST' && filter_input(INPUT_POST, '_method') !== null) { |
|
| 184 | + } elseif($this->requestMethod === 'POST' && filter_input(INPUT_POST, '_method') !== null) { |
|
| 185 | 185 | $this->requestMethod = filter_input(INPUT_POST, '_method'); |
| 186 | - }elseif($this->requestMethod === 'POST') { |
|
| 186 | + } elseif($this->requestMethod === 'POST') { |
|
| 187 | 187 | $headers = $this->getRequestHeaders(); |
| 188 | 188 | if(isset($headers['X-HTTP-Method-Override']) && in_array($headers['X-HTTP-Method-Override'], ['PUT', 'DELETE', 'PATCH'])) { |
| 189 | 189 | $this->requestMethod = $headers['X-HTTP-Method-Override']; |