public function setMethod($method) {

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

        $this->method = $method;

        return $this;

    }
public function setMethod($method) {

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

        $this->method = $method;

        return $this;

    }
public function setMethod ( $ method ) { if ( empty ( $ method ) || ! is_string ( $ method ) ) throw new InvalidArgumentException ( "Invalid RPC method" ) ; $ this -> method = $ method ; return $ this ; }
Set rpc method

@param string $method
@return self
@throws InvalidArgumentException
Set rpc method