Set transaction method.

@param string $method - method name

@return $this
492207
public function setTransactionMethod($method)
    {
        // check if is array
        if (!is_array($this->transactionMethods)) {
            $this->transactionMethods = [$method];

            return $this;
        }

        // check if method is already in array
        if (!in_array($method, $this->transactionMethods)) {
            $this->transactionMethods[] = $method;
        }

        return $this;
    }
1110761
public function setPaymentMethod(ComSubscriptionsDomainPaymentMethodInterface $method)
    {
        $this->_payment_method = $method;
        $this->method = (string) $method;

        return $this;
    }
599011
public function removeAny($method)
    {
        $keys = [];

        foreach ($this->expectations as $k => $expectation) {
            if ($expectation->getMethod() == $method) {
                $keys[] = $k;
            }
        }

        foreach ($keys as $key) {
            unset($this->expectations[$key]);
        }

        return $this;
    }
733096
public function setMethod($method) {
        if (isset(static::$_methodOptionMap[$method])) {
            return $this->setOption(static::$_methodOptionMap[$method],true);
        } else {
            return $this->setOption(CURLOPT_CUSTOMREQUEST,$method);
        }
    }
968316
public function setMethod($method = self::GET)
	{
		if (in_array($method, $this->allowedMethods)) {
			$this->method = $method;
		} else {
			throw new RuntimeException('Invalid method setted.');
		}
		
		return $this;
	}
852242
protected function setRequestMethod($method)
    {
        // Preventing request methods collision
        $this->removeOption(CURLOPT_NOBODY);
        $this->removeOption(CURLOPT_HTTPGET);
        $this->removeOption(CURLOPT_POST);
        $this->removeOption(CURLOPT_CUSTOMREQUEST);

        switch (strtoupper($method)) {
            case 'HEAD':
                $this->addOption(CURLOPT_NOBODY, true);
            break;

            case 'GET':
                $this->addOption(CURLOPT_HTTPGET, true);
            break;

            case 'POST':
                $this->addOption(CURLOPT_POST, true);
            break;

            case 'RAW_POST':
                $this->addOption(CURLOPT_CUSTOMREQUEST, 'POST');
            break;

            default:
                $this->addOption(CURLOPT_CUSTOMREQUEST, $method);
        }
    }
726913
public function setMethod( $method )
	{
		Deprecation::getInstance()
			->setErrorVersion( '0.8.4.7' )
			->setExceptionVersion( '0.9' )
			->message( 'Please use $request->getMethod()->set() instead' );
		$this->method->set( $method );
		return $this;
	}
847302
public function setMethod($method) {

		$method = strtoupper($method);
		if($method != 'GET' && $method != 'POST') {
			throw new HtmlFormException(sprintf("Invalid form method: '%s'.", $method), HtmlFormException::INVALID_METHOD);
		}
		$this->method = $method;

		return $this;

	}
1040370
public function setMethodOverride($method = NULL)
	{
		if($method === NULL)
		{
			$this->methodOverride = NULL;
		}
		else
		{
			$method = strtoupper($method);
			
			if(!preg_match("'^[A-Z]{2,}$'", $method))
			{
				throw new \InvalidArgumentException(sprintf('Invalid HTTP request method: "%s"', $method));
			}
			
			$this->methodOverride = $method;
		}
		
		return $this;
	}
402521
public function each($method)
    {
        foreach ($this as $rec) {
            if (is_string($method)) {
                $rec->$method();
            } elseif (is_callable($method)) {
                call_user_func($method, $rec);
            }
        }

        return $this;
    }
752249
public function withMethod(string $method): self {
        if ($this->method === $method) {
            return $this;
        }

        $clone = clone $this;
        $clone->method = $method;

        return $clone;
    }
858376
private function wrapTransactionNestingLevel($method)
    {
        $e = null;

        $this->setTransactionNestingLevel($this->getPersistedTransactionNestingLevel());

        try {
            \call_user_func(['parent', $method]);
        } catch (\Exception $e) {
        }

        $this->persistTransactionNestingLevel($this->getTransactionNestingLevel());

        if ($e) {
            throw $e;
        }
    }
749366
public function withMethod($method)
    {
        $method = strtoupper($method);

        if (false === in_array($method, ['GET', 'HEAD', 'POST', 'PUT', 'OPTIONS', 'DELETE'])) {
            throw new \InvalidArgumentException(
                sprintf('Invalid HTTP method: %s', $method)
            );
        }

        return $this->_clone('method', $method);
    }
108792
public function withMethod($method)
    {
        $this->assertMethod($method);
        
        $request = $this->copy();
        $request->method = $method;
        
        return $request;
    }
1140430
public function setCanonicalMethod($method)
	{
		if (array_key_exists($method, $this->c14nOptionMapping))
		{
			$this->canonicalMethod = $method;
		}
		else
		{
			trigger_error(sprintf('The chosen canonical method (%s) is not supported', $method), E_USER_WARNING);
		}
		
		return $this;
	}
483563
public function method(string $method, string ...$methods): self
    {
        array_unshift($methods, $method);

        return $this->setAllowedMethods($methods);
    }
167963
public function setMethod($method)
    {
        if(!in_array(strtoupper($method), $this->allowedMethods)) {
          throw new \InvalidArgumentException("The HTTP Client doesn't accept $method requests.");
        }

        $this->method = $method;
        return $this;
    }