public static function prepareRingRequest(Transaction $trans)
    {
        // Clear out the transaction state when initiating.
        $trans->exception = null;
        $request = self::createRingRequest($trans->request);

        // Emit progress events if any progress listeners are registered.
        if ($trans->request->getEmitter()->hasListeners('progress')) {
            $emitter = $trans->request->getEmitter();
            $request['client']['progress'] = function ($a, $b, $c, $d) use ($trans, $emitter) {
                $emitter->emit('progress', new ProgressEvent($trans, $a, $b, $c, $d));
            };
        }

        return $request;
    }
public static function prepareRingRequest(Transaction $trans)
    {
        // Clear out the transaction state when initiating.
        $trans->exception = null;
        $request = self::createRingRequest($trans->request);

        // Emit progress events if any progress listeners are registered.
        if ($trans->request->getEmitter()->hasListeners('progress')) {
            $emitter = $trans->request->getEmitter();
            $request['client']['progress'] = function ($a, $b, $c, $d) use ($trans, $emitter) {
                $emitter->emit('progress', new ProgressEvent($trans, $a, $b, $c, $d));
            };
        }

        return $request;
    }
public static function prepareRingRequest ( Transaction $ trans ) { // Clear out the transaction state when initiating. $ trans -> exception = null ; $ request = self :: createRingRequest ( $ trans -> request ) ; // Emit progress events if any progress listeners are registered. if ( $ trans -> request -> getEmitter ( ) -> hasListeners ( 'progress' ) ) { $ emitter = $ trans -> request -> getEmitter ( ) ; $ request [ 'client' ] [ 'progress' ] = function ( $ a , $ b , $ c , $ d ) use ( $ trans , $ emitter ) { $ emitter -> emit ( 'progress' , new ProgressEvent ( $ trans , $ a , $ b , $ c , $ d ) ) ; } ; } return $ request ; }
Creates a Ring request from a request object AND prepares the callbacks.

@param Transaction $trans Transaction to update.

@return array Converted Guzzle Ring request.
Creates a Ring request from a request object AND prepares the callbacks .