mini\Controller\Router::methodMatches()
Method
private
Signature
private function methodMatches(string $routeMethod, string $requestMethod): bool
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$routeMethod |
string |
required | Documentation missing |
$requestMethod |
string |
required | Documentation missing |
Returns
bool
Documentation
Does a registered route method satisfy the request method?
* matches anything. HEAD requests fall back to GET routes per RFC 9110 §9.3.2:
"A server SHOULD send the same header fields in response to a HEAD request
as it would have sent if the request method had been GET". The downstream
web server (nginx/php-fpm/cli) is responsible for stripping the body before
sending the HEAD response on the wire.