src/Bunny/Channel.php
public function confirmSelect(callable $callback = null, $nowait = false)
    {
        if ($this->mode !== ChannelModeEnum::REGULAR) {
            throw new ChannelException("Channel not in regular mode, cannot change to transactional mode.");
        }

        $response = $this->confirmSelectImpl($nowait);

        if ($response instanceof PromiseInterface) {
            return $response->then(function ($response) use ($callback) {
                $this->enterConfirmMode($callback);
                return $response;
            });

        } else {
            $this->enterConfirmMode($callback);
            return $response;
        }
    }
public function confirmSelect(callable $callback = null, $nowait = false)
    {
        if ($this->mode !== ChannelModeEnum::REGULAR) {
            throw new ChannelException("Channel not in regular mode, cannot change to transactional mode.");
        }

        $response = $this->confirmSelectImpl($nowait);

        if ($response instanceof PromiseInterface) {
            return $response->then(function ($response) use ($callback) {
                $this->enterConfirmMode($callback);
                return $response;
            });

        } else {
            $this->enterConfirmMode($callback);
            return $response;
        }
    }
public function confirmSelect ( callable $ callback = null , $ nowait = false ) { if ( $ this -> mode !== ChannelModeEnum :: REGULAR ) { throw new ChannelException ( "Channel not in regular mode, cannot change to transactional mode." ) ; } $ response = $ this -> confirmSelectImpl ( $ nowait ) ; if ( $ response instanceof PromiseInterface ) { return $ response -> then ( function ( $ response ) use ( $ callback ) { $ this -> enterConfirmMode ( $ callback ) ; return $ response ; } ) ; } else { $ this -> enterConfirmMode ( $ callback ) ; return $ response ; } }
Changes channel to confirm mode. Broker then asynchronously sends 'basic.ack's for published messages.

@param bool $nowait
@return Protocol\MethodConfirmSelectOkFrame|PromiseInterface
Changes channel to confirm mode . Broker then asynchronously sends basic . ack s for published messages .