src/Protocol/Protocol.php
final public function getConnectFrame(
        $login = '',
        $passcode = '',
        array $versions = [],
        $host = null,
        $heartbeat = [0, 0]
    ) {
        $frame = $this->createFrame('CONNECT');
        $frame->legacyMode(true);

        if ($login || $passcode) {
            $frame->addHeaders(['login' => $login, 'passcode' => $passcode]);
        }

        if ($this->hasClientId()) {
            $frame['client-id'] = $this->getClientId();
        }

        if (!empty($versions)) {
            $frame['accept-version'] = implode(',', $versions);
        }

        $frame['host'] = $host;

        $frame['heart-beat'] = $heartbeat[0] . ',' . $heartbeat[1];

        return $frame;
    }
final public function getConnectFrame(
        $login = '',
        $passcode = '',
        array $versions = [],
        $host = null,
        $heartbeat = [0, 0]
    ) {
        $frame = $this->createFrame('CONNECT');
        $frame->legacyMode(true);

        if ($login || $passcode) {
            $frame->addHeaders(['login' => $login, 'passcode' => $passcode]);
        }

        if ($this->hasClientId()) {
            $frame['client-id'] = $this->getClientId();
        }

        if (!empty($versions)) {
            $frame['accept-version'] = implode(',', $versions);
        }

        $frame['host'] = $host;

        $frame['heart-beat'] = $heartbeat[0] . ',' . $heartbeat[1];

        return $frame;
    }
final public function getConnectFrame ( $ login = '' , $ passcode = '' , array $ versions = [ ] , $ host = null , $ heartbeat = [ 0 , 0 ] ) { $ frame = $ this -> createFrame ( 'CONNECT' ) ; $ frame -> legacyMode ( true ) ; if ( $ login || $ passcode ) { $ frame -> addHeaders ( [ 'login' => $ login , 'passcode' => $ passcode ] ) ; } if ( $ this -> hasClientId ( ) ) { $ frame [ 'client-id' ] = $ this -> getClientId ( ) ; } if ( ! empty ( $ versions ) ) { $ frame [ 'accept-version' ] = implode ( ',' , $ versions ) ; } $ frame [ 'host' ] = $ host ; $ frame [ 'heart-beat' ] = $ heartbeat [ 0 ] . ',' . $ heartbeat [ 1 ] ; return $ frame ; }
Get the connect frame

@param string $login
@param string $passcode
@param array $versions
@param string $host
@param int[] $heartbeat
@return \Stomp\Transport\Frame
Get the connect frame