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

getHttpMethodParameterOverride() public static method

Checks whether support for the _method request parameter is enabled.
public static getHttpMethodParameterOverride ( ) : boolean
return boolean True when the _method request parameter is enabled, false otherwise
    public static function getHttpMethodParameterOverride()
    {
        return self::$httpMethodParameterOverride;
    }

Usage Example

Example #1
0
 /**
  * Returns the correct RESTful verb, given either by the request itself or
  * via the "_method" parameter.
  *
  * @return string HTTP method, either
  */
 protected function getRestMethod()
 {
     $request = $this->getRequest();
     if (Request::getHttpMethodParameterOverride() || !$request->request->has('_method')) {
         return $request->getMethod();
     }
     return $request->request->get('_method');
 }
All Usage Examples Of Symfony\Component\HttpFoundation\Request::getHttpMethodParameterOverride