public function setProtocol($protocol) {

        $proto = strtoupper($protocol);

        if ( !in_array($proto, static::$supported_protocols) ){
            throw new Exception("Invalid RPC protocol");
        }

        $this->protocol = $proto;

        return $this;

    }
public function setProtocol($protocol) {

        $proto = strtoupper($protocol);

        if ( !in_array($proto, static::$supported_protocols) ){
            throw new Exception("Invalid RPC protocol");
        }

        $this->protocol = $proto;

        return $this;

    }
public function setProtocol ( $ protocol ) { $ proto = strtoupper ( $ protocol ) ; if ( ! in_array ( $ proto , static :: $ supported_protocols ) ) { throw new Exception ( "Invalid RPC protocol" ) ; } $ this -> protocol = $ proto ; return $ this ; }
Set RPC protocol

@param string $protocol
RPC protocol

@return self
@throws Exception
Set RPC protocol