/** * This method declares a new queue * * @param Options $options * * @return string */ public function declareQueue(Options $options) { $queue = $this->queue_declare($options->getName(), $options->getPassive(), $options->getDurable(), $options->getExclusive(), $options->getAutoDelete(), $options->getNowait(), $options->getArguments(), $options->getTicket()); if (!empty($queue)) { $queueName = array_shift($queue); } else { $queueName = $options->getName(); } return $queueName; }
/** * This method declares a new exchange * * @param Options $options * * @return $this - Channel - Provides fluent interface */ public function declareExchange(Options $options) { $this->exchangeOptions = $options; $this->exchange_declare($this->exchangeOptions->getName(), $this->exchangeOptions->getType(), $this->exchangeOptions->getPassive(), $this->exchangeOptions->getDurable(), $this->exchangeOptions->getAutoDelete(), $this->exchangeOptions->getInternal(), $this->exchangeOptions->getNowait(), $this->exchangeOptions->getArguments(), $this->exchangeOptions->getTicket()); return $this; }