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

        return $this;
    }
365133
public function setMethod(string $method) : self
    {
        if ($method == 'GET') {
            $this->setCsrf(false);
        }

        return $this->addAttribute('method', $method);
    }
699579
public function setRequestMethodArgs(array $arguments)
    {
        $arguments = array_values($arguments);
        array_unshift($arguments, null);
        unset($arguments[ 0 ]);

        $this->requestMethodArgs = $arguments;

        return $this;
    }
766758
public function setMethods(array $methods)
    {
        $methods = array_map('strtoupper', $methods);
        $diff = array_diff($methods, static::VALID_METHODS);
        if ($diff !== []) {
            throw new InvalidArgumentException(
                sprintf('Invalid HTTP method received. %s is invalid.', implode(', ', $diff))
            );
        }
        $this->defaults['_method'] = $methods;

        return $this;
    }
396233
public function setChildrenMethod($method)
    {
        // Check method is valid
        if (!$this->rootNode->hasMethod($method)) {
            throw new InvalidArgumentException(sprintf(
                "Can't find the method '%s' on class '%s' for getting tree children",
                $method,
                get_class($this->rootNode)
            ));
        }
        $this->childrenMethod = $method;
        return $this;
    }
535828
public static function setMethod($method = 'auto')
    {
        if (!\in_array($method, ['auto', 'curl', 'fopen'], true)) {
            $method = 'auto';
        }

        self::$method = $method;

        return new self();
    }
1022328
public function setArguments($arguments = array())
    {
        // add additional arguments
        if (!$arguments) {
            $arguments = array();
        }
        if (!is_array($arguments)) {
            throw new BaseException('Arguments must be always an array');
        }
        $this->arguments = $args = array_merge($this->arguments, $arguments);
        foreach ($args as $arg => $val) {
            if (is_null($val)) {
                unset($this->arguments[$arg]);
            }
        }

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

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

        $this->method = $method;

        return $this;

    }
1034404
public function setMethods(array $methods) {
        foreach ($methods as $method) {
            if ( ! HttpRequestMethod::isValid($method)) {
                throw new Exception(
                    s(
                        'Invalid request method %s. Valid methods are %s.',
                        $method, implode(', ', HttpRequestMethod::getMethods())
                    )
                );
            }
        }

        $this->methods = $methods;
    }
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;
	}
270484
public function setNumChildrenMethod($method)
    {
        // Check method is valid
        if (!$this->rootNode->hasMethod($method)) {
            throw new InvalidArgumentException(sprintf(
                "Can't find the method '%s' on class '%s' for counting tree children",
                $method,
                get_class($this->rootNode)
            ));
        }
        $this->numChildrenMethod = $method;
        return $this;
    }
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;
    }
83799
public function setMethod($method)
    {
        $this->method = $method;
        curl_setopt($this->curlHandler, CURLOPT_CUSTOMREQUEST, $method);
        return $this;
    }
210187
private void storeArgs(Method method, Array methodArgs) {

	Class[] pmt = method.getParameterTypes();
	Method[] args;
	synchronized (methodArgs) {
	    Object o = methodArgs.get(pmt.length + 1, null);
	    if (o == null) {
		args = new Method[1];
		methodArgs.setEL(pmt.length + 1, args);
	    }
	    else {
		Method[] ms = (Method[]) o;
		args = new Method[ms.length + 1];
		for (int i = 0; i < ms.length; i++) {
		    args[i] = ms[i];
		}
		methodArgs.setEL(pmt.length + 1, args);
	    }
	}
	args[args.length - 1] = method;
    }
898291
protected function resolveArguments(
        ReflectionMethod $method,
        array $arguments
    ) {
        $params = $method->getParameters();
        $result = [];

        foreach ($params as $param) {
            /** @var ReflectionParameter $param */
            if (isset($arguments[$param->name])) {
                $result[$param->name] = $arguments[$param->name];
                continue;
            }

            $class = $param->getClass();
            if ($class) {
                $className = $class->getName();
                if ($this->isShared($className)) {
                    $result[$className] = isset($this->sharedInstances[$className])
                        ? $this->sharedInstances[$className]
                        : $this->get($className);
                } else {
                    $result[$className] = $this->create($className);
                }
            }
        }

        return $result;
    }
1157443
protected function callTraitMethod($method, array $args=[])
    {
        if (method_exists($this, $method)) {
            return call_user_func([$this, $method], ...$args);
        }
        return null;
    }
872725
public function withMethods(array $methods)
    {
        foreach ($methods as $method => $args) {
            $this->withMethod($method, $args);
        }

        return $this;
    }