/**
* 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');
}