public function delete($exchangeName = null, $flags = AMQP_NOPARAM) {

        $if_unused = boolval($flags & AMQP_IFUNUSED);

        if($exchangeName === null)
            $exchangeName = $this->name;

        try {
            $this->channel->_getChannel()->exchange_delete($exchangeName, $if_unused);
        } catch (AMQPRuntimeException $e) {
            throw new AMQPConnectionException($e->getMessage(), $e->getCode(), $e->getPrevious());
        } catch (Exception $e) {
            throw new AMQPExchangeException($e->getMessage(), $e->getCode(), $e->getPrevious());
        }

        return true;

    }
public function delete($exchangeName = null, $flags = AMQP_NOPARAM) {

        $if_unused = boolval($flags & AMQP_IFUNUSED);

        if($exchangeName === null)
            $exchangeName = $this->name;

        try {
            $this->channel->_getChannel()->exchange_delete($exchangeName, $if_unused);
        } catch (AMQPRuntimeException $e) {
            throw new AMQPConnectionException($e->getMessage(), $e->getCode(), $e->getPrevious());
        } catch (Exception $e) {
            throw new AMQPExchangeException($e->getMessage(), $e->getCode(), $e->getPrevious());
        }

        return true;

    }
public function delete ( $ exchangeName = null , $ flags = AMQP_NOPARAM ) { $ if_unused = boolval ( $ flags & AMQP_IFUNUSED ) ; if ( $ exchangeName === null ) $ exchangeName = $ this -> name ; try { $ this -> channel -> _getChannel ( ) -> exchange_delete ( $ exchangeName , $ if_unused ) ; } catch ( AMQPRuntimeException $ e ) { throw new AMQPConnectionException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e -> getPrevious ( ) ) ; } catch ( Exception $ e ) { throw new AMQPExchangeException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e -> getPrevious ( ) ) ; } return true ; }
Delete the exchange from the broker.

@param string $exchangeName Optional name of exchange to delete.
@param integer $flags Optionally AMQP_IFUNUSED can be specified
to indicate the exchange should not be
deleted until no clients are connected to
it.

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

@return boolean true on success or false on failure.
Delete the exchange from the broker .