public function purgeQueue($name)
    {
        if (!isset($this->_queues[$name])) {
            throw new InvalidKeyException(['purge `:queue` queue failed: it is NOT exists', 'queue' => $name]);
        }

        try {
            $this->_queues[$name]->purge();
        } catch (\Exception $e) {
            throw new AmqpException(['purge `:queue` queue failed: error', 'queue' => $name, 'error' => $e->getMessage()]);
        }

        return $this;
    }
public function purgeQueue($name)
    {
        if (!isset($this->_queues[$name])) {
            throw new InvalidKeyException(['purge `:queue` queue failed: it is NOT exists', 'queue' => $name]);
        }

        try {
            $this->_queues[$name]->purge();
        } catch (\Exception $e) {
            throw new AmqpException(['purge `:queue` queue failed: error', 'queue' => $name, 'error' => $e->getMessage()]);
        }

        return $this;
    }
public function purgeQueue ( $ name ) { if ( ! isset ( $ this -> _queues [ $ name ] ) ) { throw new InvalidKeyException ( [ 'purge `:queue` queue failed: it is NOT exists' , 'queue' => $ name ] ) ; } try { $ this -> _queues [ $ name ] -> purge ( ) ; } catch ( \ Exception $ e ) { throw new AmqpException ( [ 'purge `:queue` queue failed: error' , 'queue' => $ name , 'error' => $ e -> getMessage ( ) ] ) ; } return $ this ; }
Purge the contents of a queue

@param string $name

@return static
Purge the contents of a queue