예제 #1
0
파일: Factory.php 프로젝트: lightster/hodor
 public function disconnectAll()
 {
     if (!$this->channel_manager) {
         return;
     }
     $this->channel_manager->disconnectAll();
 }
예제 #2
0
 /**
  * @return Channel
  */
 private function getChannel()
 {
     if ($this->channel) {
         return $this->channel;
     }
     $this->channel = $this->channel_factory->getChannel($this->queue_key);
     return $this->channel;
 }
예제 #3
0
 /**
  * @covers ::__construct
  * @covers ::getChannel
  * @covers ::<private>
  * @dataProvider provideRequiredQueueConfigOptions
  * @param string $config_key
  * @expectedException LogicException
  */
 public function testAnExceptionIsThrownIfAnyRequiredConfigElementsAreMissing($config_key)
 {
     $all_queues = $this->getTestQueues();
     $queue = $all_queues['fast_jobs'];
     unset($queue[$config_key]);
     $config = $this->getTestConfig(['fast_jobs' => $queue]);
     $channel_factory = new ChannelFactory($config);
     $channel_factory->getChannel('fast_jobs');
 }