public function queue($name, $options = [])
    {
        if (empty($this->_queues[$name])) {
            $channel = $this->channel($name, $options);
            $queue = new AMQPQueue($channel);
            $queue->setName($name);

            if (!empty($options['flags'])) {
                $queue->setFlags($options['flags']);
            }

            $this->_queues[$name] = $queue;
        }

        return $this->_queues[$name];
    }
public function queue($name, $options = [])
    {
        if (empty($this->_queues[$name])) {
            $channel = $this->channel($name, $options);
            $queue = new AMQPQueue($channel);
            $queue->setName($name);

            if (!empty($options['flags'])) {
                $queue->setFlags($options['flags']);
            }

            $this->_queues[$name] = $queue;
        }

        return $this->_queues[$name];
    }
public function queue ( $ name , $ options = [ ] ) { if ( empty ( $ this -> _queues [ $ name ] ) ) { $ channel = $ this -> channel ( $ name , $ options ) ; $ queue = new AMQPQueue ( $ channel ) ; $ queue -> setName ( $ name ) ; if ( ! empty ( $ options [ 'flags' ] ) ) { $ queue -> setFlags ( $ options [ 'flags' ] ) ; } $ this -> _queues [ $ name ] = $ queue ; } return $ this -> _queues [ $ name ] ; }
Connects to a queue with the given name, the object returned
can be used to configure and create a new one.

@param string $name
@param array $options
@return AMQPQueue
Connects to a queue with the given name the object returned can be used to configure and create a new one .