protected function connect()
    {
        // Binary operations will not work on Windows with PHP < 5.2.6.
        $rb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'r' : 'rb';
        $wb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'w' : 'wb';

        $this->stdin  = fopen('php://stdin', $rb);
        $this->stdout = fopen('php://stdout', $wb);

        if (function_exists('stream_set_read_buffer')) {
            stream_set_read_buffer($this->stdin, 0);
        }
        stream_set_write_buffer($this->stdout, 0);

        // initial handshake
        $this->send($this->getOK('Crypt_GPG pinentry ready and waiting'));

        return $this;
    }
protected function connect()
    {
        // Binary operations will not work on Windows with PHP < 5.2.6.
        $rb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'r' : 'rb';
        $wb = (version_compare(PHP_VERSION, '5.2.6') < 0) ? 'w' : 'wb';

        $this->stdin  = fopen('php://stdin', $rb);
        $this->stdout = fopen('php://stdout', $wb);

        if (function_exists('stream_set_read_buffer')) {
            stream_set_read_buffer($this->stdin, 0);
        }
        stream_set_write_buffer($this->stdout, 0);

        // initial handshake
        $this->send($this->getOK('Crypt_GPG pinentry ready and waiting'));

        return $this;
    }
protected function connect ( ) { // Binary operations will not work on Windows with PHP < 5.2.6. $ rb = ( version_compare ( PHP_VERSION , '5.2.6' ) < 0 ) ? 'r' : 'rb' ; $ wb = ( version_compare ( PHP_VERSION , '5.2.6' ) < 0 ) ? 'w' : 'wb' ; $ this -> stdin = fopen ( 'php://stdin' , $ rb ) ; $ this -> stdout = fopen ( 'php://stdout' , $ wb ) ; if ( function_exists ( 'stream_set_read_buffer' ) ) { stream_set_read_buffer ( $ this -> stdin , 0 ) ; } stream_set_write_buffer ( $ this -> stdout , 0 ) ; // initial handshake $ this -> send ( $ this -> getOK ( 'Crypt_GPG pinentry ready and waiting' ) ) ; return $ this ; }
Connects this pinentry to the assuan server

Opens I/O streams and sends initial handshake.

@return Crypt_GPG_PinEntry the current object, for fluent interface.
Connects this pinentry to the assuan server