Gets the request method.
The method is always an uppercased string.
@api
string The request method
public function getMethod() {
if (null === $this->method) {
$this->method = strtoupper($this->server
->get('REQUEST_METHOD', 'GET'));
if ('POST' === $this->method) {
$this->method = strtoupper($this->headers
->get('X-HTTP-METHOD-OVERRIDE', $this->request
->get('_method', $this->query
->get('_method', 'POST'))));
}
}
return $this->method;
}