public function delete($flags = AMQP_NOPARAM) {

        $if_unused = boolval($flags & AMQP_IFUNUSED);

        try {
            list($num_deleted) = $this->channel->_getChannel()->queue_delete($this->name, $if_unused);
        } catch (AMQPRuntimeException $e) {
            throw new AMQPConnectionException($e->getMessage(), $e->getCode(), $e->getPrevious());
        } catch (Exception $e) {
            return 0;
        }

        //Will always be defined if an exception isn't thrown
        return $num_deleted;
    }
public function delete($flags = AMQP_NOPARAM) {

        $if_unused = boolval($flags & AMQP_IFUNUSED);

        try {
            list($num_deleted) = $this->channel->_getChannel()->queue_delete($this->name, $if_unused);
        } catch (AMQPRuntimeException $e) {
            throw new AMQPConnectionException($e->getMessage(), $e->getCode(), $e->getPrevious());
        } catch (Exception $e) {
            return 0;
        }

        //Will always be defined if an exception isn't thrown
        return $num_deleted;
    }
public function delete ( $ flags = AMQP_NOPARAM ) { $ if_unused = boolval ( $ flags & AMQP_IFUNUSED ) ; try { list ( $ num_deleted ) = $ this -> channel -> _getChannel ( ) -> queue_delete ( $ this -> name , $ if_unused ) ; } catch ( AMQPRuntimeException $ e ) { throw new AMQPConnectionException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e -> getPrevious ( ) ) ; } catch ( Exception $ e ) { return 0 ; } //Will always be defined if an exception isn't thrown return $ num_deleted ; }
Delete a queue from the broker.

This includes its entire contents of unread or unacknowledged messages.

@param integer $flags Optionally AMQP_IFUNUSED can be specified
to indicate the queue should not be
deleted until no clients are connected to
it.

@throws AMQPChannelException    If the channel is not open.
@throws AMQPConnectionException If the connection to the broker was lost.

@return integer The number of deleted messages.
Delete a queue from the broker .