public function withMinimumVersion(int $version): self
    {
        if ($version !== self::TLSv1_0 && $version !== self::TLSv1_1 && $version !== self::TLSv1_2) {
            throw new \Error('Invalid minimum version, only TLSv1.0, TLSv1.1 or TLSv1.2 allowed');
        }

        $clone = clone $this;
        $clone->minVersion = $version;

        return $clone;
    }
public function withMinimumVersion(int $version): self
    {
        if ($version !== self::TLSv1_0 && $version !== self::TLSv1_1 && $version !== self::TLSv1_2) {
            throw new \Error('Invalid minimum version, only TLSv1.0, TLSv1.1 or TLSv1.2 allowed');
        }

        $clone = clone $this;
        $clone->minVersion = $version;

        return $clone;
    }
public function withMinimumVersion ( int $ version ) : self { if ( $ version !== self :: TLSv1_0 && $ version !== self :: TLSv1_1 && $ version !== self :: TLSv1_2 ) { throw new \ Error ( 'Invalid minimum version, only TLSv1.0, TLSv1.1 or TLSv1.2 allowed' ) ; } $ clone = clone $ this ; $ clone -> minVersion = $ version ; return $ clone ; }
Minimum TLS version to negotiate.

Defaults to TLS 1.0.

@param int $version `ServerTlsContext::TLSv1_0`, `ServerTlsContext::TLSv1_1`, or `ServerTlsContext::TLSv1_2`.

@return self Cloned, modified instance.
@throws \Error If an invalid minimum version is given.
Minimum TLS version to negotiate .