| @@ 13-29 (lines=17) @@ | ||
| 10 | private $resolver; |
|
| 11 | private $options; |
|
| 12 | ||
| 13 | public function __construct( |
|
| 14 | $queueName, |
|
| 15 | $basicQos = 1, |
|
| 16 | $durable = false, |
|
| 17 | $autoDelete = true, |
|
| 18 | array $arguments = null |
|
| 19 | ) { |
|
| 20 | $this->resolver = new OptionsResolver(); |
|
| 21 | $this->resolver->setDefaults([ |
|
| 22 | 'queue_name' => $queueName, |
|
| 23 | 'basic_qos' => $basicQos, |
|
| 24 | 'durable' => $durable, |
|
| 25 | 'auto_delete' => $autoDelete, |
|
| 26 | 'arguments' => $arguments |
|
| 27 | ]); |
|
| 28 | $this->options = $this->resolver->resolve([]); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @param $queue |
|
| @@ 13-29 (lines=17) @@ | ||
| 10 | private $resolver; |
|
| 11 | private $options; |
|
| 12 | ||
| 13 | public function __construct( |
|
| 14 | $exchangeName, |
|
| 15 | $type = ExchangeType::FANOUT, |
|
| 16 | $queueName = null, |
|
| 17 | $basicQos = 1, |
|
| 18 | array $arguments = null |
|
| 19 | ) { |
|
| 20 | $this->resolver = new OptionsResolver(); |
|
| 21 | $this->resolver->setDefaults([ |
|
| 22 | 'exchange' => $exchangeName, |
|
| 23 | 'type' => $type, |
|
| 24 | 'queue_name' => $queueName, |
|
| 25 | 'basic_qos' => $basicQos, |
|
| 26 | 'arguments' => $arguments |
|
| 27 | ]); |
|
| 28 | $this->options = $this->resolver->resolve([]); |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @param $exchange |
|