Fxmlrpc\MulticallBuilder::addCall PHP Method

addCall() public method

public addCall ( $methodName, array $params = [], callable $onSuccess = null, callable $onError = null )
$params array
$onSuccess callable
$onError callable
    public function addCall($methodName, array $params = [], callable $onSuccess = null, callable $onError = null)
    {
        if (!is_string($methodName)) {
            throw InvalidArgumentException::expectedParameter(1, 'string', $methodName);
        }
        $this->calls[$this->index] = compact('methodName', 'params');
        $this->handlers[$this->index] = compact('onSuccess', 'onError');
        ++$this->index;
        return $this;
    }