public function purge()
    {
        if ($this->eventDispatcher) {
            $purgeEvent = new PurgeEvent($this->queue);

            $this->eventDispatcher->dispatch(PurgeEvent::NAME, $purgeEvent);
        }

        return $this->call($this->queue, 'purge');
    }
public function purge()
    {
        if ($this->eventDispatcher) {
            $purgeEvent = new PurgeEvent($this->queue);

            $this->eventDispatcher->dispatch(PurgeEvent::NAME, $purgeEvent);
        }

        return $this->call($this->queue, 'purge');
    }
public function purge ( ) { if ( $ this -> eventDispatcher ) { $ purgeEvent = new PurgeEvent ( $ this -> queue ) ; $ this -> eventDispatcher -> dispatch ( PurgeEvent :: NAME , $ purgeEvent ) ; } return $ this -> call ( $ this -> queue , 'purge' ) ; }
Purge the contents of the queue.

@throws \AMQPChannelException    if the channel is not open
@throws \AMQPConnectionException if the connection to the broker was lost

@return bool
Purge the contents of the queue .