src/Server/Asyn/MQTT/MQTT.php
public function setVersion($version)
    {
        if ($version == self::VERSION_3 || $version == self::VERSION_3_1_1) {
            $this->version = $version;
        } else {
            throw new Exception('Invalid version');
        }
    }
public function setVersion($version)
    {
        if ($version == self::VERSION_3 || $version == self::VERSION_3_1_1) {
            $this->version = $version;
        } else {
            throw new Exception('Invalid version');
        }
    }
public function setVersion ( $ version ) { if ( $ version == self :: VERSION_3 || $ version == self :: VERSION_3_1_1 ) { $ this -> version = $ version ; } else { throw new Exception ( 'Invalid version' ) ; } }
Set Protocol Version

@param string $version
@throws Exception
Set Protocol Version