public function setType($exchange_type) {

        if(!in_array($exchange_type, array(AMQP_EX_TYPE_DIRECT, AMQP_EX_TYPE_FANOUT, AMQP_EX_TYPE_HEADERS, AMQP_EX_TYPE_TOPIC)))
            return false;

        $this->type = $exchange_type;
        return true;
    }
public function setType($exchange_type) {

        if(!in_array($exchange_type, array(AMQP_EX_TYPE_DIRECT, AMQP_EX_TYPE_FANOUT, AMQP_EX_TYPE_HEADERS, AMQP_EX_TYPE_TOPIC)))
            return false;

        $this->type = $exchange_type;
        return true;
    }
public function setType ( $ exchange_type ) { if ( ! in_array ( $ exchange_type , array ( AMQP_EX_TYPE_DIRECT , AMQP_EX_TYPE_FANOUT , AMQP_EX_TYPE_HEADERS , AMQP_EX_TYPE_TOPIC ) ) ) return false ; $ this -> type = $ exchange_type ; return true ; }
Set the type of the exchange.

Set the type of the exchange. This can be any of AMQP_EX_TYPE_DIRECT,
AMQP_EX_TYPE_FANOUT, AMQP_EX_TYPE_HEADERS or AMQP_EX_TYPE_TOPIC.

@param string $exchange_type The type of exchange as a string.

@return boolean TRUE on success or FALSE on failure.
Set the type of the exchange .