public function declareQueue() {

        $durable = boolval($this->flags & AMQP_DURABLE);
        $passive = boolval($this->flags & AMQP_PASSIVE);
        $exclusive = boolval($this->flags & AMQP_EXCLUSIVE);
        $auto_delete = boolval($this->flags & AMQP_AUTODELETE);

        try {
            list($this->name, $num_messages) = $this->channel->_getChannel()->queue_declare($this->name, $passive, $durable, $exclusive, $auto_delete, $nowait = false, $this->arguments);
        } catch (AMQPRuntimeException $e) {
            throw new AMQPConnectionException($e->getMessage(), $e->getCode(), $e->getPrevious());
        } catch (Exception $e) {
            return 0;
        }

        return $num_messages;
    }
public function declareQueue() {

        $durable = boolval($this->flags & AMQP_DURABLE);
        $passive = boolval($this->flags & AMQP_PASSIVE);
        $exclusive = boolval($this->flags & AMQP_EXCLUSIVE);
        $auto_delete = boolval($this->flags & AMQP_AUTODELETE);

        try {
            list($this->name, $num_messages) = $this->channel->_getChannel()->queue_declare($this->name, $passive, $durable, $exclusive, $auto_delete, $nowait = false, $this->arguments);
        } catch (AMQPRuntimeException $e) {
            throw new AMQPConnectionException($e->getMessage(), $e->getCode(), $e->getPrevious());
        } catch (Exception $e) {
            return 0;
        }

        return $num_messages;
    }
public function declareQueue ( ) { $ durable = boolval ( $ this -> flags & AMQP_DURABLE ) ; $ passive = boolval ( $ this -> flags & AMQP_PASSIVE ) ; $ exclusive = boolval ( $ this -> flags & AMQP_EXCLUSIVE ) ; $ auto_delete = boolval ( $ this -> flags & AMQP_AUTODELETE ) ; try { list ( $ this -> name , $ num_messages ) = $ this -> channel -> _getChannel ( ) -> queue_declare ( $ this -> name , $ passive , $ durable , $ exclusive , $ auto_delete , $ nowait = false , $ this -> arguments ) ; } catch ( AMQPRuntimeException $ e ) { throw new AMQPConnectionException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e -> getPrevious ( ) ) ; } catch ( Exception $ e ) { return 0 ; } return $ num_messages ; }
Declare a new queue on the broker.

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

@return integer the message count.
Declare a new queue on the broker .