public function setProtocolLevel($value)
    {
        if ($value < 3 || $value > 4) {
            throw new \InvalidArgumentException(sprintf('Unknown protocol level %d.', $value));
        }

        $this->protocolLevel = $value;
        if ($this->protocolLevel === 3) {
            $this->protocolName = 'MQIsdp';
        } elseif ($this->protocolLevel === 4) {
            $this->protocolName = 'MQTT';
        }
    }
public function setProtocolLevel($value)
    {
        if ($value < 3 || $value > 4) {
            throw new \InvalidArgumentException(sprintf('Unknown protocol level %d.', $value));
        }

        $this->protocolLevel = $value;
        if ($this->protocolLevel === 3) {
            $this->protocolName = 'MQIsdp';
        } elseif ($this->protocolLevel === 4) {
            $this->protocolName = 'MQTT';
        }
    }
public function setProtocolLevel ( $ value ) { if ( $ value < 3 || $ value > 4 ) { throw new \ InvalidArgumentException ( sprintf ( 'Unknown protocol level %d.' , $ value ) ) ; } $ this -> protocolLevel = $ value ; if ( $ this -> protocolLevel === 3 ) { $ this -> protocolName = 'MQIsdp' ; } elseif ( $ this -> protocolLevel === 4 ) { $ this -> protocolName = 'MQTT' ; } }
Sets the protocol level.

@param int $value

@throws \InvalidArgumentException
Sets the protocol level .