protected function validateScheme($scheme)
    {
        if (!$scheme) {
            throw new InvalidArgumentException('No scheme specified');
        }
        if (!in_array($scheme, self::$schemes)) {
            throw new InvalidArgumentException(
                'Unknown socket scheme: ' . $scheme
            );
        }

        if ($scheme == self::SCHEME_WEBSOCKET_SECURE) {
            return self::SCHEME_UNDERLYING_SECURE;
        }
        return self::SCHEME_UNDERLYING;
    }
protected function validateScheme($scheme)
    {
        if (!$scheme) {
            throw new InvalidArgumentException('No scheme specified');
        }
        if (!in_array($scheme, self::$schemes)) {
            throw new InvalidArgumentException(
                'Unknown socket scheme: ' . $scheme
            );
        }

        if ($scheme == self::SCHEME_WEBSOCKET_SECURE) {
            return self::SCHEME_UNDERLYING_SECURE;
        }
        return self::SCHEME_UNDERLYING;
    }
protected function validateScheme ( $ scheme ) { if ( ! $ scheme ) { throw new InvalidArgumentException ( 'No scheme specified' ) ; } if ( ! in_array ( $ scheme , self :: $ schemes ) ) { throw new InvalidArgumentException ( 'Unknown socket scheme: ' . $ scheme ) ; } if ( $ scheme == self :: SCHEME_WEBSOCKET_SECURE ) { return self :: SCHEME_UNDERLYING_SECURE ; } return self :: SCHEME_UNDERLYING ; }
Validates a scheme

@param string $scheme
@return string Underlying scheme
@throws InvalidArgumentException
Validates a scheme