public function setMethod($method)
	{
		$method = strtoupper($method);
		
		if(!preg_match("'^[A-Z]{2,}$'", $method))
		{
			throw new \InvalidArgumentException(sprintf('Invalid HTTP request method: "%s"', $method));
		}
		
		$this->method = $method;

		return $this;
	}
public function setMethod($method)
	{
		$method = strtoupper($method);
		
		if(!preg_match("'^[A-Z]{2,}$'", $method))
		{
			throw new \InvalidArgumentException(sprintf('Invalid HTTP request method: "%s"', $method));
		}
		
		$this->method = $method;

		return $this;
	}
public function setMethod ( $ method ) { $ method = strtoupper ( $ method ) ; if ( ! preg_match ( "'^[A-Z]{2,}$'" , $ method ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid HTTP request method: "%s"' , $ method ) ) ; } $ this -> method = $ method ; return $ this ; }
Set the HTTP request method.

@param string $method The name of the HTTP method (uppercase).
@return HttpRequest

@throws \InvalidArgumentException When the given HTTP method is invalid.
Set the HTTP request method .