@param string $method

@return self
550188
public static function create(string $method): self
    {
        $self = new self();
        $self->method = $method;

        return $self;
    }
1196761
public function call(string $method, ...$vars) : self
    {
        $clone = clone $this;
        $clone->elements = array_map(function ($element) use ($method, $vars) {
            return call_user_func_array([$element, $method], $vars);
        }, $this->elements);

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

        if (in_array($method, [Form::METHOD_GET, Form::METHOD_POST])) {
            $this->method = $method;
        } else {
            throw new \Exception('Incorrect method value given');
        }
        return $this;
    }
1217976
public function method($method)
    {
        // Convert to an array if needed
        if (!is_array($method)) {
            $method = [$method];
        }

        $this->method = $method;
        return $this;
    }
692199
public function callback($method)
    {
        if (method_exists($this->owner, $method)) {
            return $this->owner->{$method}($this);
        }

        return;
    }
358397
public final function setMethodArguments(string $method, array $methodArguments): self
    {
        $this->methodArguments[$method] = $methodArguments;

        return $this;
    }
1195758
public function setMethod(int $method)
    {
        $this->method = $method;
        curl_setopt($this->connection, $method, true);

        return $this;
    }
180041
final public function withMethod($method): self
    {
        $request = clone $this;
        $request->method = $this->filterMethod($method);

        return $request;
    }
235317
public function setMethod($method) {

        if ( empty($method) || !is_string($method) ) throw new InvalidArgumentException("Invalid RPC method");

        $this->method = $method;

        return $this;

    }
538523
public function setMethod($method)
	{
		if($method == 'any')
			$method = array('get', 'post', 'put', 'delete', 'patch', 'options');
		else if(!is_array($method))
			$method = explode('|', $method);

		$method = array_map(function($value){return trim(strtolower($value));}, $method);
	
		$this->setProperty('method', $method);

		return $this;
	}
122548
protected function setMethod($method)
    {
        switch (strtoupper($method)) {
            case 'HEAD':
                curl_setopt($this->request, CURLOPT_NOBODY, true);
                break;
            case 'GET':
                curl_setopt($this->request, CURLOPT_HTTPGET, true);
                break;
            case 'POST':
                curl_setopt($this->request, CURLOPT_POST, true);
                break;
            default:
                curl_setopt($this->request, CURLOPT_CUSTOMREQUEST, $method);
        }
    }
1036653
public function setMethod($method)
    {
        if (is_string($method))
            $method = explode('|', $method);

        $this->method = array_map('strtoupper', $method);

        return $this;
    }
821918
private function init($method)
    {
        if (is_string($method) && method_exists($this, $method))
        {
            return $this->$method();
        }

        return $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;
	}
558759
public function setMethod($method) {
        $this->method = (true === in_array($method, [self::HTTP_METHOD_GET, self::HTTP_METHOD_POST]) ? $method : self::HTTP_METHOD_POST);
        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;
	}
296300
public function removeMethodCall($method)
    {
        foreach ($this->calls as $i => $call) {
            if ($call[0] === $method) {
                unset($this->calls[$i]);
                break;
            }
        }

        return $this;
    }