public function setMethod($method)
	{
		$method = strtolower($method);

		if (!array_key_exists($method, static::$methods)) {
			throw new \InvalidArgumentException("Method [$method] not a valid HTTP method.");
		}

		if ($this->data && !static::$methods[$method]) {
			throw new \LogicException('Request has POST data, but tried changing HTTP method to one that does not allow POST data');
		}

		$this->method = $method;

		return $this;
	}
public function setMethod($method)
	{
		$method = strtolower($method);

		if (!array_key_exists($method, static::$methods)) {
			throw new \InvalidArgumentException("Method [$method] not a valid HTTP method.");
		}

		if ($this->data && !static::$methods[$method]) {
			throw new \LogicException('Request has POST data, but tried changing HTTP method to one that does not allow POST data');
		}

		$this->method = $method;

		return $this;
	}
public function setMethod ( $ method ) { $ method = strtolower ( $ method ) ; if ( ! array_key_exists ( $ method , static :: $ methods ) ) { throw new \ InvalidArgumentException ( "Method [$method] not a valid HTTP method." ) ; } if ( $ this -> data && ! static :: $ methods [ $ method ] ) { throw new \ LogicException ( 'Request has POST data, but tried changing HTTP method to one that does not allow POST data' ) ; } $ this -> method = $ method ; return $ this ; }
Set the HTTP method of the request.

@param string $method
Set the HTTP method of the request .