Symfony\Component\HttpFoundation\Request::getRealMethod PHP Метод

getRealMethod() публичный метод

Gets the "real" request method.
См. также: getMethod()
public getRealMethod ( ) : string
Результат string The request method
    public function getRealMethod()
    {
        return strtoupper($this->server->get('REQUEST_METHOD', 'GET'));
    }

Usage Example

Пример #1
0
 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