public function callRemoteArray($method, $args)
    {
        if (isset($this->remoteMethods[$method])) {
            $this->remoteMethods[$method](...$args);
            return $this;
        }
        $pct = [
            'method' => $method,
        ];
        if (sizeof($args)) {
            $callbacks = [];
            $path = [];
            $this->extractCallbacks($args, $callbacks, $path);
            $pct['arguments'] = $args;
            if (sizeof($callbacks)) {
                $pct['callbacks'] = $callbacks;
            }
        }
        $this->sendPacket($pct);
        return $this;
    }
public function callRemoteArray($method, $args)
    {
        if (isset($this->remoteMethods[$method])) {
            $this->remoteMethods[$method](...$args);
            return $this;
        }
        $pct = [
            'method' => $method,
        ];
        if (sizeof($args)) {
            $callbacks = [];
            $path = [];
            $this->extractCallbacks($args, $callbacks, $path);
            $pct['arguments'] = $args;
            if (sizeof($callbacks)) {
                $pct['callbacks'] = $callbacks;
            }
        }
        $this->sendPacket($pct);
        return $this;
    }
public function callRemoteArray ( $ method , $ args ) { if ( isset ( $ this -> remoteMethods [ $ method ] ) ) { $ this -> remoteMethods [ $ method ] ( ... $ args ) ; return $ this ; } $ pct = [ 'method' => $ method , ] ; if ( sizeof ( $ args ) ) { $ callbacks = [ ] ; $ path = [ ] ; $ this -> extractCallbacks ( $ args , $ callbacks , $ path ) ; $ pct [ 'arguments' ] = $ args ; if ( sizeof ( $ callbacks ) ) { $ pct [ 'callbacks' ] = $ callbacks ; } } $ this -> sendPacket ( $ pct ) ; return $ this ; }
Calls a remote method with array of arguments
@param  string $method Method name
@param  array $args Arguments
@return this
Calls a remote method with array of arguments