public function __construct($connection, $queue_name = null, $prefetchCount = null, $args = null) { parent::__construct($connection, $prefetchCount); $this->queue = new \AMQPQueue($this->channel); if (!empty($queue_name)) { $this->queue->setName($queue_name); } else { // declare new queue $this->queue->setFlags(AMQP_EXCLUSIVE | AMQP_AUTODELETE); $this->queue->declare(); } if (is_array($args)) { $this->queue->setArguments($args); } }
/** * Create a new channel instance. * * @param string $name * @return void */ public function __construct($name) { parent::__construct('private-' . $name); }
/** * Create a new channel instance. * * @param string $name * @return void */ public function __construct($name) { parent::__construct('presence-' . $name); }
/** * @param Kafka $connection */ public function __construct(Kafka $connection) { parent::__construct($connection); $this->messageQueue = array(); }
public function __construct($socket, $timeout) { parent::__construct(uniqid(), null, $socket, $timeout); $this->fresh = true; }
public function __construct($connection, $exchange_name) { parent::__construct($connection); $this->exchange = new \AMQPExchange($this->channel); $this->exchange->setName($exchange_name); }