Symfony\Component\HttpFoundation\Request::getRealMethod PHP Method

getRealMethod() public method

Gets the "real" request method.
See also: getMethod()
public getRealMethod ( ) : string
return string The request method
    public function getRealMethod()
    {
        return strtoupper($this->server->get('REQUEST_METHOD', 'GET'));
    }

Usage Example

 public function getRequestParameters()
 {
     if ($this->request->getRealMethod() === 'POST') {
         return $this->request->request->all();
     } else {
         return $this->request->query->all();
     }
 }
All Usage Examples Of Symfony\Component\HttpFoundation\Request::getRealMethod