public function connect() {
        $host = $this->getAuthenticator()->getHost();
        $port = $this->getAuthenticator()->getPort();
        $this->setConnection(ssh2_connect($host, $port));
        if (false === $this->getConnection()) {
            throw $this->newFTPException("connection failed");
        }
        return $this;
    }
public function connect() {
        $host = $this->getAuthenticator()->getHost();
        $port = $this->getAuthenticator()->getPort();
        $this->setConnection(ssh2_connect($host, $port));
        if (false === $this->getConnection()) {
            throw $this->newFTPException("connection failed");
        }
        return $this;
    }
public function connect ( ) { $ host = $ this -> getAuthenticator ( ) -> getHost ( ) ; $ port = $ this -> getAuthenticator ( ) -> getPort ( ) ; $ this -> setConnection ( ssh2_connect ( $ host , $ port ) ) ; if ( false === $ this -> getConnection ( ) ) { throw $ this -> newFTPException ( "connection failed" ) ; } return $ this ; }
Opens this SFTP connection.

@return SFTPClient Returns this SFTP client.
@throws FTPException Throws a FTP exception if an I/O error occurs.
Opens this SFTP connection .